Docs for deploying canonical-kubernetes incomplete

Bug #1662172 reported by Alexander List on 2017-02-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Insights
Undecided
Unassigned

Bug Description

https://insights.ubuntu.com/2016/11/21/conjure-up-canonical-kubernetes-under-lxd-today/ is missing a few steps. Also, for people who are impatient, certain -y and --auto flags are useful.

I suggest the following amendments:

#1) don't pollute /etc/sysctl.conf but use an include:
#Create a file /etc/sysctl.d/10-lxd-requirements.conf with the following content:

fs.inotify.max_user_instances = 1048576
fs.inotify.max_queued_events = 1048576
fs.inotify.max_user_watches = 1048576
vm.max_map_count = 262144

#To activate these kernel parameters, do:
sudo sysctl -p /etc/sysctl.d/10-lxd-requirements.conf

#2) add steps that lead to errors if omitted:

#Install conjure-up and deploy kubernetes:
sudo apt install software-properties-common # required for apt-add-repository, may not be present e.g. in cloud images
sudo apt-add-repository -y ppa:juju/stable
sudo apt-add-repository -y ppa:conjure-up/next
sudo apt update
sudo apt -y install conjure-up
# the following three steps are missing:
sudo lxd init --auto # Caveat: This may consume quite some disk space...
newgrp lxd
sudo lxc network set lxdbr0 ipv6.address none

conjure-up kubernetes

I tested on my laptop running 16.10 (Yakkety) and on a Zesty (17.04) Desktop VM.

Alexander List (alexlist) wrote :

I just noticed that kubectl is not present in ~/bin, even though the last step of conjure-up kubernetes claimed to take care of that...

Alexander List (alexlist) wrote :

Please ignore my last comment.

Adam Stokes (adam-stokes) wrote :

Thanks for the updates Alexander. We'll look into getting this implemented. Also we're switching to a pure snap distribution and a lot of the steps can be omitted. For this article though I approve the changes with a small fix:

We should create /usr/lib/sysctl.d/10-lxd-requirements.conf and point sysctl to that as I believe this is the recommended way going forward.

Also sudo lxc network doesn't work on Xenial as that ability didn't show up until LXD 2.4+. We could make a note to edit the /etc/default/lxd-bridge file as seen here: http://conjure-up.io/docs/en/users/#_disable_ipv6_on_lxd_versions_2_2_and_below

Alexander List (alexlist) wrote :

Adam, thanks for the quick response.

I tried again, and really didn't get anything created in ~/bin or ~/.kube, so I just did a "juju ssh kubernetes-master/0" and ran kubectl from there.

I tried both The Canonical Distribution of Kubernetes (nice word play btw...) and Kubernetes Core after firing "conjure-up kubernetes", and didn't get any of the Kibana dashboard functionality or services exposed. Maybe PEBCAK, maybe we should continue this on IRC...

Really cool stuff that you're doing here, I tried other approaches like minikube and that failed horribly on my laptop running Yakkety...

Jorge Castro (jorge) wrote :

Hi Alexander,

You can find the Kubernetes team on #juju on Freenode, thanks!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers