Prerequisites#
The Rackspace Kubernetes-as-a-Service (KaaS) solution enables you to run Kubernetes workloads on top of a Rackspace Private Cloud powered by OpenStack. All the underlying infrastructure is deployed for you by the Rackspace deployment engineers.
Before you begin using Rackspace KaaS, you must have the following items on your client machine:
install-kubernetes-ca-cert.sh
: Provided by your administrator along with a collection of files and credentials required to access Kubernetes-as-a-Service.credentials.sh
: Provided by your administrator and includesRS_K8S_USERNAME
andRS_K8S_PASSWORD
.- kubectl: An
official Kubernetes command line client. All examples in this guide use
kubectl
. - Docker Community Edition: Required to execute examples described in this guide.
Access your Kubernetes cluster#
To access your Kubernetes cluster, you need to provide a token,
which is a random string that uniquely identifies you. A convenient way
to configure kubectl
to use your token is to create a kubeconfig
file and configure kubectl
to use it.
See the list of Rackspace KaaS dashboards and the credentials to access them at Access the Rackspace KaaS dashboards.
To generate a token and configure a kubeconfig
file:
Use a web browser to access the Rackspace KaaS Control Panel at https://control-panel.<openstack-env-domain-name>/.
Use your OpenStack username and password to log in.
In the navigation bar on the left, ensure that the cluster you want to access is active by checking the following:
- If the topmost item in the navigation bar is the heading My Cluster, then your environment has only one running Kubernetes cluster, which means the correct cluster is active.
- If the topmost item in the navigation bar is a blue selection box, ensure that the name of the cluster you want to access is displayed, indicating that it is active.
In the Cluster Info section of the dashboard, click Get Kubeconfig. Doing so generates a new token with the description generated for
kubeconfig
and displays the complete contents of thekubeconfig
file that contains the newly-generated token.Copy the contents of the
kubeconfig
file and save it to a location on your client machine. We recommend that you keep the file in your home directory. For example,~/.kube/rackspace/kubeconfig
. You might need to create this path.Configure
kubectl
to use thekubeconfig
file by setting theKUBECONFIG
environment variable.$ export KUBECONFIG=~/.kube/rackspace/kubeconfig
Note
Although these instructions emphasize selecting a particular cluster, you can use any token that you have generated to access any Kubernetes cluster in your environment. If you want to use the same token with multiple clusters, see the kubeconfig file documentation.