You can study kubernetes with vagrant. Credits go to the Kinvolk team because this repository is based on https://github.com/kinvolk/kubernetes-the-hard-way-vagrant .
- Uses containerd
- Uses gVisor
- The pod-cidr is the same as the tutorial (
10.200.${i}.0/24
)
- Hit
vagrant up
to bring up the vms (1 load balancer node, 3 controllers nodes , 3 worker nodes) - Use the
workspace
directory to follow Kelsey Hightower's repository https://github.com/kelseyhightower/kubernetes-the-hard-way - A few things to care about is
gcloud
commands won't work (of course). Skip everything related togcloud
or use an alternative command. Have a look at thescripts
directory if you get stuck. They correspond with the chapters.EXTERNAL_IP
,KUBERNETES_PUBLIC_ADDRESS
would be10.240.0.40
(the load balancer's ip)- vagrant-scp would come in handy for
scp
commands - Careful about
INTERNAL_IP
s andPOD_CIDR
because you cannot fetch them withgcloud
commands. - Be sure to add the
[plugins.cri]
config andstream_server_address
setting to thecontainerd
'sconfig.toml
. If you miss this, you won't be able toexec
in to the container. Have a look at the script .
vagrant destroy -f
when you finish and clean up theworkspace
.
All the scripts inside the scripts
directory correspond to the commands and chapters mentioned in the tutorial. It uses alternative commands which correspond to gcloud
commands. This has been tested with this version of the tutorial.