Install Canonical Kubernetes in development environments¶
We recommend testing Canonical Kubernetes in an isolated environment such as a clean virtual machine or LXD container.
If you choose to install Canonical Kubernetes directly on your development machine, please take note of the following considerations.
Containerd conflicts¶
Canonical Kubernetes uses the default containerd paths, which means that a Canonical Kubernetes installation will conflict with any existing system configuration where containerd is already installed. For example, if you have Docker installed, or another Kubernetes distribution that uses containerd.
You may specify a custom containerd path like so:
cat <<EOF | sudo k8s bootstrap --file -
containerd-base-dir: $containerdBaseDir
cluster-config:
network:
enabled: true
dns:
enabled: true
local-storage:
enabled: true
EOF
Changing IP addresses¶
The local IP addresses of your development machine are likely to change, for example after joining a different wi-fi network.
In this case, you may configure Canonical Kubernetes to use the localhost
address:
sudo k8s boostrap --address=127.0.0.1
Conflicting Docker iptables rules¶
Docker can interfere with LXD and Multipass installations, setting the global
FORWARD
policy to drop.
See the lxd network troubleshooting guide for more details and possible workarounds.