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.
# atomic install --system --system-package=no --name kube-apiserver registry.fedoraproject.org/f27/kubernetes-apiserver
# atomic install --system --system-package=no --name kube-controller-manager registry.fedoraproject.org/f27/kubernetes-controller-manager
# atomic install --system --system-package=no --name kube-scheduler registry.fedoraproject.org/f27/kubernetes-scheduler
Note: the kube-apiserver system container provides the kubectl
client.
# atomic install --system --system-package=no --name kubelet registry.fedoraproject.org/f27/kubernetes-kubelet
# atomic install --system --system-package=no --name kube-proxy registry.fedoraproject.org/f27/kubernetes-proxy
# atomic install --system --system-package=no --name etcd registry.fedoraproject.org/f27/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.
# atomic install --system --system-package=no --name flanneld registry.fedoraproject.org/f27/flannel
TK
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