Difference between revisions of "Microk8s on LXD 2"
Jump to navigation
Jump to search
(Created page with "for i in kub1 kube2 kube3; do sudo lxc init ubuntu:20.04 $i --vm -c limits.cpu=4 -c limits.memory=8GB lxc config device override $i root size=32GB do lxc start kub1 kub2 kub3") |
|||
Line 1: | Line 1: | ||
+ | ``` | ||
for i in kub1 kube2 kube3; do | for i in kub1 kube2 kube3; do | ||
− | + | lxc init ubuntu:20.04 $i --vm -c limits.cpu=4 -c limits.memory=8GB | |
− | lxc config device override $i root size=32GB | + | lxc config device override $i root size=32GB |
− | + | lxc start $i | |
− | lxc | + | lxc exec $i -- snap install microk8s --classic |
+ | lxc exec $i -- printf "alias kubectl='microk8s kubectl'\nalias k='microk8s kubectl'" >> /root/.bashrc | ||
+ | joincmd=$(lxc exec kub1 -- microk8s add-node | sed -n '2p') | ||
+ | done | ||
+ | |||
+ | ``` |
Revision as of 17:03, 20 March 2021
for i in kub1 kube2 kube3; do lxc init ubuntu:20.04 $i --vm -c limits.cpu=4 -c limits.memory=8GB lxc config device override $i root size=32GB lxc start $i lxc exec $i -- snap install microk8s --classic lxc exec $i -- printf "alias kubectl='microk8s kubectl'\nalias k='microk8s kubectl'" >> /root/.bashrc joincmd=$(lxc exec kub1 -- microk8s add-node | sed -n '2p') done