Docker & Kubernates

Open PowerShell (Admin) and run following commands:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install kubernetes-cli kubernetes-helm -y
  • Docker for Desktop

choco install docker-desktop -y
  • Use default installation with Linux Containers

  • Enable Kubernetes in Docker settings on the Kubernetes tab

  • Make sure that Kubernetes context of Docker is set to docker-for-desktop

kubectl config use-context docker-for-desktop

Kubernetes dashboard

Open PowerShell (Admin) and run following commands:

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
kubectl proxy

Open PowerShell (Admin) and run following commands:

kubectl create serviceaccount dashboard -n default
kubectl create clusterrolebinding dashboard-admin -n default  --clusterrole=cluster-admin --serviceaccount=default:dashboard
$data = kubectl get secret $(kubectl get serviceaccount dashboard -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}"; [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($data))`
  • Save the token from PowerShell and navigate to Kubernetes dashboard

  • Select token option, paste the token from PowerShell and Sign In (If lost token can be retrieved simply by using get secret command again)

Last updated

Was this helpful?