Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

How to Migrate to Fedora 27 Atomic Kubernetes in System Containers

Starting with version 27 of Fedora Atomic Host, the rpms for Kubernetes, Flannel and Etcd are no longer "baked into" the image, but are available instead as system containers.

System containers can serve as drop-in replacements for components that had been included in the Fedora Atomic image. Once installed, these components will be manageable using the same systemctl commands that apply to regular rpm-installed components.

To replace Kubernetes, Flannel and Etcd with system containers, you would run the following commands.

System containers for master nodes

# atomic install --system --system-package=no --name kube-apiserver

# atomic install --system --system-package=no --name kube-controller-manager

# atomic install --system --system-package=no --name kube-scheduler

Note: the kube-apiserver system container provides the kubectl client.

System containers for worker nodes

# atomic install --system --system-package=no --name kubelet

# atomic install --system --system-package=no --name kube-proxy

System container for etcd

# atomic install --system --system-package=no --name etcd

When installed with the name "etcd," the etcd system container expects to find stores etcd data in /var/lib/etcd/etcd.etcd. The etcd rpm is configured by default to store data in /var/lib/etcd/default.etcd, and the ansible scripts in kubernetes/contrib use /var/lib/etcd. On a system running etcd as configured by the kubernetes/contrib ansible scripts, you'd move your data as follows:

# systemctl stop etcd

# cp -r /var/lib/etcd/member /var/lib/etcd/etcd.etcd/

Note: the etcd container provides the etcdctl client.

System container for flannel

# atomic install --system --system-package=no --name flanneld

Updating system containers


An alternative to system containers

An altenative to system containers is package layering, which allows you to layer rpms onto your ostree installation. You could install all of the kubernetes, etcd and flannel packages using the command:

# rpm-ostree install kubernetes flannel etcd -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment