Kubernetes Logo

Connecting

  • Managing resources in kubernetes is performed using the kubectl tool.

  • This is installed locally, and connects to remote clusters using information in the kubeconfig file

Local Installation using minikube

  • You can only install minikube direct on a host OS. Installing minikube in a guest OS in a VM is not supported.

  • Follow the instructions at kubernetes.io to install kubectl Kubectl is the kubernetes command-line tool which is used to run commands against a kubernetes cluster.

  • Follow the instructions at kubernetes.io to install minikube , a single-machine kubernetes installation that runs on a virtual machine on your own computer.

  • Instructions on starting and connecting to your minikube

  • To switch kubectl to the minikube context in your kubeconfig file use: kubectl config use-context minikube

Kubernetes in the cloud

AWS

To connect to an existing AWS Kubernetes cluster, you will either need to use the AWS CLI, or install the AWS IAM authenticator.

Azure

To connect to an existing Azure managed kubernetes cluster, you will need to install the azure CLI

  • Ensure you have a user account in Azure that can connect to your cluster.

  • Install the Azure CLI

  • Configure kubectl to connect to your cluster: az aks get-credentials --resource-group myResourceGroup --name myAKSCluster

  • When working with multiple clusters, you can switch to your AKS cluster using kubectl config use-context myAKSCluster