Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.93 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.93 KB

About

Provision a three nodes Kubernetes cluster with an NFS server using Vagrant and Docker compose. This is a local cluster intended to be used for local development and testing.

Prerequisites

  • Vagrant
  • Virtualbox
  • Docker Desktop (macOS and Windows) or docker daemon and docker CLI (linux)

Controlling the cluster

The bin directory contains four scripts:

  • up.sh: brings up the NFS server and the Kubernetes cluster
  • pause.sh: pauses the NFS server container and shuts down the VMs of the cluster
  • resume.sh: unpauses the NFS server container and boots up the VMs of the cluster
  • down.sh: cleans all the used resources

Cluster nodes

The cluster has three nodes:

Node VM OS CPUs Memory IP
master-01 k8s.local.master-01 Ubuntu 22.04 2 2048 192.168.56.29
worker-01 k8s.local.worker-01 Ubuntu 22.04 1 1024 192.168.56.30
worker-02 k8s.local.worker-02 Ubuntu 22.04 1 1024 192.168.56.31

To ssh into one of the nodes, cd into the cluster directory and run vagrant ssh <node_name>.

kubectl is installed on the master-01 node with the alias k.

Features

  • A Kubernetes dashboard is available at: http://192.168.56.29:30000/
  • The cluster has a default storage class named nfs-client that will dynamically provision Persistent Volumes in the NFS server.
  • Manifest files placed under the directory specified by the variable RESOURCES_PATH in the Vagrantfile will be copied under /vagrant/.resources in the master node and will be automatically applied when the master node is finished bootstraping.

TODO

  • Replace the extensive use of the yq command with Kustomize.
  • Upgrade to Kubernetes v1.27