With Docker Desktop, you'll get a managed Kubernetes cluster after some initial setup. IMPORTANT: This has a potential license issue, as Docker charges larger companies a per-seat license fee. It is free for your personal/educational use. It is free for use during class, but a license requirement applies once the class is over. If you're unsure, check with your company management or choose the Rancher Desktop option below. For more details on Docker's license and whether it applies to you at work, visit their FAQ.
- Visit docker.com
- Click the install link in the center of the page. Be careful if you're on a Mac to choose the correct chip. It defaults to Intel Macs. If you're unsure, look at the Apple menu on your computer, then
About This Mac
. - Once installed, open the Docker application.
- You'll have Docker menu on your computer (whale logo). Click it and choose the
Signup/Signin to Docker Hub
option. This will open a browser to Docker Hub where you can login or sign up for a free account. - (For Kubernetes courses) Install Kubernetes
- Once you're signed in, open the Docker menu again and choose
Preferences
. Then go to theKubernetes
section. Check the box forEnable Kubernetes
then click theApply and Restart
button. This will begin the Kubernetes setup process which usually takes 10-15 minutes. - Once finished, you'll be able to open a terminal and run
kubectl get all
and get some output that is clearly not a connection error.
- Once you're signed in, open the Docker menu again and choose
A great open-source option with no license issues. Rancher Desktop comes with automatic Kubernetes support.
- Visit rancherdesktop.io
- Scroll down to the installer section and pick the correct installer. Be careful if you're on a Mac to choose the correct chip. It defaults to Intel Macs. If you're unsure, look at the Apple menu on your computer, then
About This Mac
. - Follow the installation instructions. When prompted for for container engine, choose
dockerd (moby)
. When prompted for a Kubernetes version, choose the latest stable release.
Here we have two versions, with curl or with Chocolatey:
With Choco
- Run
choco install kubernetes-cli
- Verify:
kubectl version --client
With curl
- Download from this link: curl.exe -LO "https://dl.k8s.io/release/v1.27.2/bin/windows/amd64/kubectl.exe"
Tip: Change where it says v1.27.2 to the one you prefer
-
Put the file somewhere
-
Set a PATH:
Select Control Panel and then System. Click Advanced and then Environment Variables. Add the location of the kubectl folder to the PATH variable in System Variables. The following is a typical value for the
PATH
variable:C:\WINDOWS\system32;C:\WINDOWS;"C:\{WHEREVER_YOU_PUT_IT}"
-
Test:
kubectl version --client
From Choco
- Run
choco install kubernetes-helm
- Verify
helm -version
- The best way is to use Chocolatey (https://chocolatey.org/install) and run:
choco install terraform
- Download and run the MSI AWS CLI installer: https://awscli.amazonaws.com/AWSCLIV2.msi
- Verify running in any terminal:
aws --version
- Same as above
For Intel Chip
- Download
curl -LO "https://dl.k8s.io/release/v1.27.2/bin/darwin/amd64/kubectl"
setting the version as the one your want - Make it executable
chmod +x ./kubectl
- Move the kubectl binary to a file location on your system PATH.
sudo mv ./kubectl /usr/local/bin/kubectl
sudo chown root: /usr/local/bin/kubectl
- Verify:
kubectl version --client
For Apple chip
- Download
curl -LO "https://dl.k8s.io/release/v1.27.2/bin/darwin/arm64/kubectl"
setting the version as the one your want - Make it executable
chmod +x ./kubectl
- Move the kubectl binary to a file location on your system PATH.
sudo mv ./kubectl /usr/local/bin/kubectl
sudo chown root: /usr/local/bin/kubectl
- Verify:
kubectl version --client
brew install helm
- Run
brew tap hashicorp/tap
- Run
brew install hashicorp/tap/terraform
- Run:
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
- Verify running in any terminal:
aws --version
Download ASDF from https://asdf-vm.com/ and you can install the kubectl plugin by doing:
asdf plugin add kubectl
asdf plugin add helm
Then you can do:
asdf install kubectl 1.25.9
And it will just work. You can even set different versions for different projects.