This document is about to create a kubernetes cluster from scatch, this step-by-step instruction will provide a guide to setup your first cluster.
vagrant plugin install vagrant-scp
- This tutorial walks you through setting up Kubernetes the hard way on a local machine using VirtualBox.
- This lab is optimized for learning, it's not a fully automated command to bring up a Kubernets cluster.
Ref: Kelsey Hightower. ref: kubernetes-the-hard-way
-
kubernetes v1.20.0
-
docker
-
coredns
-
cni
-
etcd v3.4.15
I am running this lab with my laptop which is Macbook Pro 2.6 GHz 6-Core Intel Core i7, for VirtualBox and Vagrant on any supported platforms as below should be ok:
- Windows
- Linux
- Mac
| VM | VM Name | Purpose | IP | Forwarded Port |
| ------------ | -------- |:-------------:| ------------:| ----------------:|
| master-1 | master-1 | Master | 192.168.1.11 | 2711 |
| master-2 | master-2 | Master | 192.168.1.12 | 2712 |
| worker-1 | worker-1 | Worker | 192.168.1.21 | 2721 |
| worker-2 | worker-2 | Worker | 192.168.1.22 | 2722 |
| loadbalancer | lb | LoadBalancer | 192.168.1.30 | 2730 |
- currently the
workstation
is used to init the k8s setup, work need to do to make a to admin k8s.
- currently the
workstation
is used to init the k8s setup, work need to do to make a to admin k8s.
kubectl create deployment kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1