How to run kubernetes on bare-metal with maas/juju

Madushan Nishantha
Apr 22 · 5 min read
sudo add-apt-repository ppa:maas/stable
sudo apt update
sudo apt install maas
sudo maas init <you'll be asked to provide admin user info>
Despite the picture, DHCP should be disabled for both
sudo -u maas psql -d maasdb
maasdb=>update maasserver_node set memory=4096 where memory=0;
sudo add-apt-repository ppa:juju/stable
sudo apt update
sudo apt install juju
$juju add-cloud
Select cloud type: maas
Enter a name for your maas cloud: maas-cloud
Enter the API endpoint url: <MAAS url from above, looks like http://10.55.60.29:5240/MAAS>
$juju add-credential maas-cloud
Enter credential name: maas-cloud-creds
Using auth-type "oauth1".
Enter maas-oauth: <token is under "MAAS Keys" in user setting page in MAAS ui>
juju bootstrap --constraints tags=juju <maas-cloud name form above> <arbitary controller name>
ex:
juju bootstrap --constraints tags=juju maas-cloud juju-controller
juju deploy canonical-kubernetes
juju deploy ./bundle.yaml
watch -c juju status --color
juju scp kubernetes-master/0:config ~/.kube/config

Madushan Nishantha

Written by

Asynchronous Assumptions........

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade