In order to register a kubernetes cluster in okteto, you will need to provide a
password with access to your cluster, a public accessible endpoint of your cluster, and the CA certificate of your cluster.
For example, if your kubernetes cluster is running in Google Cloud, this information will be accessible from the Kubernetes clusters list.
The endpoint information of your cluster will be displayed:
Then, click on the show credentials link:
The rest of the information required by okteto will appear:
Finally, copy all this information in your okteto project settings, click on the save button on the top right and you will be ready to go:
If your kubernetes cluster has been created using a different tool, such as kops, all this information should be accessible from your
~/.kube/config k8 configuration file:
Note that the
certificate-authority-data, which has been condensed in the above image, is base64 encoded. Okteto expects this information in plain text. You can do this by running:
echo LS0tL...tCg== | base64 --decode
Services deployed in the same kubernetes project will share the same kubernetes Namespace. This will be automatically created by okteto.
For each service you deploy, okteto will create a kubernetes deployment resource running the containers defined in your service manifest.
If your service is private, a kubernetes service resource (
ClusterType) is created to make the service available from your cluster by name.
If your service is public, a kubernetes service resource (
LoadBalancerType) will be created with a DNS entry (
service_name.project_name.okteto.net) pointing to the created load balancer.