Skip to content

joje6/multinode-kubernetes-vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multinode Kubernetes on Vagrant

Configure a Kubernetes cluster with 1 master and 2 worker nodes.

Prerequisites

Vagrant and VirtualBox are required. And based on macOS.

$ brew cask install virtualbox
$ brew cask install vagrant
$ brew cask install vagrant-manager
$ vagrant plugin install vagrant-hostmanager

Start VM

$ vagrant up

Login to Node

# login to master node
$ vagrant ssh
# login to worker node
$ vagrant ssh k8s-worker-1
$ vagrant ssh k8s-worker-2

Access the Dashboard

vagrant up completes successfully, you can access the dashboard. It may take a few more minutes for ingress and dashboard pods to finish working properly.

You can find the dashboard access URL in the folder below. (config file and token is in the same directory) /shared/dashboard.url /shared/config /shared/token.txt

Using the local kubernetes client

$ brew install kubernetes-cli
$ mkdir -p ~/.kube
$ cp ./shared/config ~/.kube/config
# make sure you are connected
$ kubectl get nodes

How to use

https://kubernetes.io/docs/home/

Destroy

When you're all done, tell Vagrant to destroy the VMs.

$ vagrant destroy -f

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages