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:

  • Provided by your administrator along with a collection of files and credentials required to access Kubernetes-as-a-Service.
  • Provided by your administrator and includes RS_K8S_USERNAME and RS_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:

  1. Use a web browser to access the Rackspace KaaS Control Panel at https://<openstack-env-domain-name>:8891.

  2. Use your OpenStack username and password to log in.

  3. 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.
  4. 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 the kubeconfig file that contains the newly-generated token.

  5. 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.

  6. Configure kubectl to use the kubeconfig file by setting the KUBECONFIG environment variable.

    $ export KUBECONFIG=~/.kube/rackspace/kubeconfig


    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.