Skip to content

Multi-node local Kubernetes cluster provisioned with Vagrant in VirtualBox.

License

Notifications You must be signed in to change notification settings

antonblr/kubernetes-demo-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubernetes-demo-cluster

Setup and run a multi-node Kubernetes cluster locally with the following specs:

  • Nodes: 1 master, 2 worker (ubuntu 18.04)
  • Kubernetes 1.19.6
  • CNI: Calico v3.17

Motivation: I needed a repeatable local Kubernetes environment to prepare for CKA exam.

Pre-requisites

Installation

To provision the cluster run:

vagrant up

Verify the cluster (.cache directory will be created under kubernetes-demo-cluster/ in the previous step)

kubectl get nodes --kubeconfig=.cache/k8s-config.yaml

NAME       STATUS   ROLES    AGE     VERSION
master-0   Ready    master   4m14s   v1.19.6
worker-1   Ready    <none>   2m24s   v1.19.6
worker-2   Ready    <none>   40s     v1.19.6

Optional:

Deploy Nginx Ingress Controller:

kubectl apply -f resources/base/nginx-ingress.yaml --kubeconfig=.cache/k8s-config.yaml

Deploy metrics-server (for kubectl top commands):

kubectl apply -f resources/base/metrics-server.yaml --kubeconfig=.cache/k8s-config.yaml

Clean-up

Execute the following command to remove the virtual machines created for the Kubernetes cluster.

vagrant destroy -f

Tips

About

Multi-node local Kubernetes cluster provisioned with Vagrant in VirtualBox.

Topics

Resources

License

Stars

Watchers

Forks

Languages