/k8slocal

Automated local k8s setup

Primary LanguageShell

k8slocal setup

Automated local k8s setup

Before you start make sure you install below components I am a Mac user ;)

Default Settings

So I am using subnet as 192.168.33.0/24
and MASTER_IP: 192.168.33.100  and NODE_IPS are 100+1 and so on i.e. 192.168.33.101, 192.168.33.102 etc..

Run Vagrant Boom.........!!!

vagrant up

Login to VM boxes this is just for your info

vagrant ssh k8s.master.com    and vagrant ssh k8s.node-1.com , vagrant ssh k8s.node-2.com
now time to see get nodes by loggining as below
bharathumarsAir:k8slocal bharathkumardasararaju$ vagrant ssh k8s.master.com
Last login: Wed Mar 20 14:25:16 2019 from 10.0.2.2
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
[vagrant@k8s ~]$ kubectl get nodes -o wide
NAME             STATUS   ROLES    AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION              CONTAINER-RUNTIME
k8s.master.com   Ready    master   43m   v1.13.4   10.0.2.15     <none>        CentOS Linux 7 (Core)   3.10.0-957.5.1.el7.x86_64   docker://18.9.3
k8s.node-1.com   Ready    <none>   30m   v1.13.4   10.0.2.15     <none>        CentOS Linux 7 (Core)   3.10.0-957.5.1.el7.x86_64   docker://18.9.3
k8s.node-2.com   Ready    <none>   15m   v1.13.4   10.0.2.15     <none>        CentOS Linux 7 (Core)   3.10.0-957.5.1.el7.x86_64   docker://18.9.3
[vagrant@k8s ~]$