openstack
Prerequisites
Step 1
Get the tk8 repo
Source your OpenStack rc file , export your OpenStack CA CERT file and Initialize the kubespray repo:
Step 2
Adjust the following openstack files with your specific settings:
~/tk8/openstack/cluster.tfvars -- This file contains the parameters for the cloud components to be deployed e.g flavor, image, cluster_name, external network id (float network), number of masters, number etcd nodes, number of worker nodes etc. Some values have been set but some needs to be modified to suit your environment like the image, flavor (this is the ID not name) and external network id.
The elb_api_fqdn domain name should be set to a value that you can resolve within your network/deployment. This should be resolvable to the load balancer VIP address of the master nodes i.e. Floating IP address (you can check the load balancer on Horizon or openstack CLI to check the value of the Load Balancer floating IP address for the master nodes).
N.B -- Currently you can only use Centos 7 image (image can be downloaded from the centos public repo), Ubuntu and Coreos will be added soon.
Also make sure you use the right set of SSH keys. You are to use the SSH public key that you used to create the key pair on Openstack, otherwise the kubernetes installation will not be able to access the VMs via ssh.
~/tk8/openstack/stack_credentials.yaml -- This file contains your openstack credentials. Modify as per your openstack deployment.
Step 3
Create the infrastructure with the following command:
Step 4
Install kubernetes on the infrastructure that was created with the following command:
For the Openstack deployment, you can get the kubeconfig by checking the following location after the kubernetes installation finishes: ./kubespray/inventory/stackcluster/artifacts/admin.conf
Step 5
To destroy the infrastructure, use the following command:
N.B -- Before destroying the cluster, make sure you delete any load balancer that was created inside your kubernetes cluster. Otherwise, terraform destroy will not work completely since terraform did not create the additional load balancer (the load balancer is tied to some other aspects of the cloud which will affect the terraform destroy procedure).
Using Docker image
No Prerequisites, oh yes you need Docker :-)
Last updated