lxc configuration to deploy local kubernetes cluster
- install lxc for your specific platform
- install wget for your platform if not already
git clone https://github.com/aakashRajur/lxc-kube-cluster.git
cd lxc-kube-cluster
./create-cluster.sh $NO_OF_WORKER_NODES
where$NO_OF_WORKER_NODES
if not present will default to 2.lxc list
should show you your deployed cluster- use
lxc stop $CONTAINER_NAME
where$CONTAINER_NAME
can be any ofkmaster
,kworker1
,kworker2
until the no of workers specified in$NO_OF_WORKER_NODES
.
stop workers vms before master vm
- use
lxc start $CONTAINER_NAME
where$CONTAINER_NAME
can be any ofkmaster
,kworker1
,kworker2
until the no of workers specified in$NO_OF_WORKER_NODES
start master vm before worker vm
start-cluster.sh
should copy over kube-config to the host machine, if not uselxc file pull kmaster/root/.kube/config ~/.kube/
to do so.- your
kubectl
should work correctly now