a blog

test containerized kube and system container-based flannel and etcd

·

$ git clone https://github.com/jasonbrooks/contrib.git
$ cd contrib
$ git checkout atomic-update
$ cd ansible
$ vi inventory/inventory

[masters]
kube-master-test.example.com

[etcd:children]
masters

[nodes]
kube-minion-test-[1:2].example.com

$ cd scripts
$ ./deploy-cluster.sh

This will fail (if you use hostnames) at: TASK [flannel : Load the flannel config file into etcd] because we need this PR in the Fedora etcd system container. You can work around by sshing into your master, and editing the resolv.conf inside of your etcd system container to match the host, exiting, and re-running the script.

$ ssh root@kube-master-test.example.com
# vi /var/lib/containers/atomic/etcd/rootfs/etc/resolv.conf
# exit
$ ./deploy-cluster.sh

That should work.

This involves a bunch of changes to use docker containers for kube and use system containers for flannel and etcd. You can specify the registry, namespace and tag to use, as well as whether or not to containerize the master bits, the node bits, the etcd or the flannel using these extra options I’ve added to inventory/group_vars/all.yml:

container_registry: candidate-registry.fedoraproject.org
container_namespace: f25
container_label: latest

containerized_master: true
containerized_node: true

etcd_spc: true
flannel_spc: true

¶¶¶¶¶

¶¶¶¶¶

¶¶¶¶¶

2 responses to “test containerized kube and system container-based flannel and etcd”

  1. […] month or so ago I jotted down some notes on using ansible to set up a kubernetes cluster on atomic hosts with kubernetes running in regular […]

    Like

  2. […] month or so ago I jotted down some notes on using ansible to set up a kubernetes cluster on atomic hosts with kubernetes running in regular […]

    Like

Leave a comment