Getting access to clusters¶
Since all NAIS clusters are private, you will need to install
naisdevice to access the cluster.
Follow the installation guide to get started
First you need to install
gcloud, following the instructions for your platform.
kubectl is a command-line tool used to manage your Kubernetes resources.
kubectl is supported within one minor version (older or newer) of kube-apiserver.
Using brew to manage kubectl will make it troublesome to be within the version skew.
We therefor recommend installing kubectl manually, or through tools like asdf.
Option 1: Using nais-cli¶
If you have
nais-cli installed, you can use it to get a kubeconfig for all clusters.
It requires that you have logged into
gcloud auth login --update-adc and is connected with
Option 2: Using gcloud¶
For each cluster that you want access to, you need to login to
gcloud and know the cluster name and project id.
To ease switching namespaces and clusters, tools like kubectx and kubens can be used.
Once installed, you can use
kubens to switch between clusters and namespaces.
Another useful trait of kubectx is renaming current cluster context to something more meaningful.
Created: November 29, 2023