CC also offers KaaS (Kubernetes as a Service). KaaS makes it easy to deploy and use a K8s cluster without having to worry about the underlying infrastructure.
Setup
- Create a Cluster via Web Interface.
- After successful creation, click „Get Cluster Config“.
- Now the download of four files (cluster_config, cluster_ca.pem, cluster_cert.pem and cluster_key.pem) should start.
- Add the following parameters to your config file:
- certificate-authority-data:
cat cluster_ca.pem | base64 | tr -d '\n'
- client-certificate-data:
cat cluster_cert.pem | base64 | tr -d '\n'
- client-key-data:
cat cluster_key.pem | base64 | tr -d '\n'
- certificate-authority-data:
- Your config file should now look like this:
apiVersion: v1 clusters: - cluster: certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JS... server: https://172.17.x.y:6443 name: playground contexts: - context: cluster: playground user: playground name: playground current-context: playground kind: Config preferences: {} users: - name: playground user: client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JS... client-key-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JS...
- Now install
kubectl
to control the k8s cluster and put the config file in your home under.kube/conf
. - The output of
kubectl get nodes
should now show your configured cluster.