Install the kubectlÂ
Access the cluster
ECMWF EWC Managed Kubernetes Service - Create a Kubernetes cluster via the OpenStack CLI
Once the cluster has been created successfully it is possible to retrieve the cluster certificates and config in order to connect to it.
- Create a directory to store the cluster certificate and config :
$ mkdir -p ./k8s_config_dir
- Retrieve the cluster certificate and config
$ openstack coe cluster config \ --dir ./k8s_config_dir \ --force \ --output-certs mycluster - You can inspect the folder content to verify :
$ ls -1 k8s_config_dir/ ca.pem cert.pem config key.pem
You can then export the Kubernetes config in order to access the cluster via kubectl :
$ export KUBECONFIG=/<path>/k8s_config_dir/config
and then access the cluster via kubectl , e.g.:
$ kubectl get nodes NAME STATUS ROLES AGE VERSION mycluster-y3gdbps5sjfy-control-plane-trjgn Ready control-plane 94m v1.32.1 mycluster-y3gdbps5sjfy-control-plane-df4jk Ready control-plane 87m v1.32.1 mycluster-y3gdbps5sjfy-control-plane-hbwdz Ready control-plane 89m v1.32.1 mycluster-y3gdbps5sjfy-default-worker-sdqnk-96vhd Ready <none> 91m v1.32.1 mycluster-y3gdbps5sjfy-default-worker-sdqnk-pf37n Ready <none> 91m v1.32.1