Skip to content

Installing and configuring kubectl

kubectl is the command line tool for Kubernetes. It allows you to deploy and manage applications on Kubernetes.

Installing kubectl

  1. Follow the instructions on the Kubernetes website to install kubectl. It has install instructions for mac, linux, and windows. or for quick install on windows run the following command:
winget install -e --id Kubernetes.kubectl

Configuring kubectl

  1. Get the kubeconfig file from vaultwarden. It is placed in "Kubernetes" collection with name "Kubernetes Config for kubectl".
  2. Copy the content from vaultwarden and create a file called kubeconfig.yaml in .kube folder in your home directory. For windows users, it is C:\Users\<username>\.kube\. Create the folder if it doesn't exist.
  3. create a environemnt variable called KUBECONFIG and set it to the path of the kubeconfig file. so in windows it would be C:\Users\<username>\.kube\kubeconfig.yaml.

Testing kubectl

  1. Run the following command to check if kubectl is installed correctly:
kubectl version
  1. Run the following command to check if kubectl is configured correctly:
kubectl get nodes

It should list the strato nodes of the cluster.