Skip to content

This setup is used to create kubernetes cluster on local laptop / desktop using vagrant - with this we can create a two node cluster setup which contains one master and one worker node with one single command.

s-u-b-h-a-k-a-r/k8s-vagrant-centos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

k8s-vagrant-centos

enter image description here

About...

This setup is used to create kubernetes cluster on local laptop / desktop using vagrant - with this we can create a two node cluster setup which contains one master and one worker node with one single command.

Table of Contents

What are the prerequisites ?

  • Git
  • Vagrant
  • Oracle Virtual Manger
  • Virtualization needes to be enabled in System BIOS
  • Minimum laptop/desktop configuration - 32GB RAM / 8CPU (not to worry base OS will balance the cpu need on time sharing model), 80GB hdd disk space

How to deploy kubernetes cluster ?

Default settings:Vagrantfile

VM:
  password: kubeadmin
  master:
    ip: 100.10.10.100
    cpus: 2
    memory: 2048
    vmname: kmaster
    hostname: kmaster.example.com
  worker1:
    ip: 100.10.10.101
    cpus: 3
    memory: 16384
    vmname: kworker1
    hostname: kworker1.example.com

By running the below command kubernetes cluster will be created with 2 Centos VM's installed.

  • vagrant up

What are the addons provided ?

helm / kubernetes-dashboard / nfs-volume-provisioner

What are the VM's configured ?

By default below are the IP Addresses that will be configured for the VM's

Name IP OS RAM CPU
kmaster 100.10.10.100 CentOS7 2 GB 2
kworker1 100.10.10.101 CentOS7 16GB 3

How to access Kubernetes Dashboard ?

The Kubernetes Dashboard can be accessed via the below URL without any changes from your host machine

http://100.10.10.100:30070/#!/overview?namespace=_all

How to access Vagrant VM's ?

The Vagrant VM can be accessed in two ways

  1. Login through vagrant ssh
  • $ cd k8s-vagrant-centos/provisioning
  • $ vagrant ssh kmaster
  • $ vagrant ssh kworker1
  1. Login through putty
  • 100.10.10.100 / 100.10.10.101 [Username/Password:vagrant/vagrant (OR) root/kubeadmin]

How to stop Vagrant VM's ?

  • $ cd k8s-vagrant-centos/provisioning
  • $ vagrant halt

How to restart Vagrant VM's ?

  • $ cd k8s-vagrant-centos/provisioning
  • $ vagrant up

How to destroy Vagrant VM's ?

  • $ cd k8s-vagrant-centos/provisioning
  • $ vagrant destroy

About

This setup is used to create kubernetes cluster on local laptop / desktop using vagrant - with this we can create a two node cluster setup which contains one master and one worker node with one single command.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published