Connecting to your cluster

Note

For this guide, you will need:

  • Your Cluster URL (example: https://example.clusters.ldn.keisson.net)

  • The keisson-ca.crt file

  • The admin.crt and admin.key files

These will have been provided at initial cluster setup.

Install Kubectl

kubectl is a standard command line utility used to interact with Kubernetes clusters. All Keisson’s documentation will assume you have kubectl installed and configured.

We recommend checking out the Kubernetes Documentation for installation instructions.

Setup Kubectl

Kubectl supports saving credentials and details for more than one cluster at a time, using a variety of user authentication methods. Kubectl groups clusters and user information together into easy to switch between configurations called contexts.

Cluster

First, we must tell kubectl about the cluster:

kubectl config set-cluster keisson \
  --server https://example.clusters.ldn.keisson.net \
  --certificate-authority /path/to/keisson-ca.crt

In the above code block, change the server (https://example.clusters.ldn.keisson.net) to the URL of your cluster, and the certificate authority (/path/to/keisson-ca.crt) to the location on disk of the provided keisson-ca.crt file.

User

Second, we will tell kubectl about your user credentials.

Keisson uses client certificates for authentication. For your convenience, an admin certificate pair is created at initial setup, which full access (cluster-admin) permissions to the cluster. If you would prefer to setup different users, see creating-users.

kubectl config set-user keisson-admin \
  --client-certificate /path/to/admin.crt \
  --client-key /path/to/admin.key

In the above code block, change the client-certificate and client-key values to the locations on disk of the provided or generated admin.crt and admin.key files.

Context

Finally, we must tell kubectl to create a context using our created cluster and user configurations.

kubectl config set-context keisson \
  --cluster keisson \
  --user keisson-admin \
  --current true

Validating

Once setup, run kubectl version to output your client version and the version of your cluster.