Before we get started, we're going to set up a local Kubernetes cluster and Docker daemon so that we can build docker images and deploy them to a cluster. We're going to use Docker's desktop application as its the simplest way to get up and running.
-
Visit the Docker Desktop homepage.
-
Click
Download for Mac (Stable)
and install it.
NOTE: If you've ever exported a Kubernetes path, you'll have to combine that path with the path that Kubernetes expects the default config file to live at: ~/.kube/config
using a :
between each path:
export KUBECONFIG=<path-to-default-config.yaml>:<path-to-another-config.yaml>
-
Click on Docker for Desktop in the menu bar, go to Preferences -> Kubernetes and click Enable Kubernetes. Click show system containers (advanced), and Apply & Restart
-
Once Docker has completed installing Kubernetes you can test that it is working by using
kubectl
:
# Check that Kubernetes is running
> kubectl get nodes
NAME STATUS ROLES AGE VERSION
docker-for-desktop Ready master 3d v1.9.6
# Check that Docker is running
> docker -v
Docker version 18.05.0-ce, build f150324
-
Ensure you are ready to install Docker Desktop.
-
Visit the Docker Desktop homepage.
-
Click
Download for Windows (Stable)
and install it.
- When you first run docker it's possible that you'll have to install the Linux Kernel for Windows. You are not required to do anything beyond installing the kernel and use powershell to set
wsl
version to 2.
- Launch Docker Desktop.
-
Click the settings icon, then Kubernetes and click Enable Kubernetes. Click show system containers (advanced), and Apply & Restart
-
Once Kubernetes is active you should see that Docker and Kubernetes are active in the Docker Desktop application window.
Coming soon
You now have everything you need to start playing around with Docker and Kubernetes!
Continue to Writing a simple app