Working draft of Atomic fleet config

This is the first draft at making a repeatable workflow, I’m looking to get a few more eyes to make sure I’ve captured everything.  My next step is getting this into an ansible playbook.  Replace the inline IPs with the eth0 IPs of the VMs you build.  Hit the link to see the steps and very spare comments:

F21 Master

Build (or use Cloud Base) of F21 Server, yum updated to latest.
[fedora@f21master ~]$ sudo yum -y install kubernetes etcd ansible git
[fedora@f21master kubernetes]$ sudo vi config

[fedora@f21master kubernetes]$ sudo vi apiserver
# The address on the local server to listen to.
# How the replication controller and scheduler find the kube-apiserver

[fedora@f21master kubernetes]$ sudo vi controller-manager
# Comma seperated list of minions

[fedora@f21master ~]$ sudo systemctl start etcd kube-apiserver kube-controller-manager kube-scheduler
[fedora@f21master ~]$ sudo systemctl status etcd kube-apiserver kube-controller-manager kube-scheduler

[fedora@f21master ~]$ vi flanneld-conf.json
“Network”: “”,
“SubnetLen”: 24,
“Backend”: {
“Type”: “vxlan”
[fedora@f21master ~]$ curl -L http://localhost:4001/v2/keys/ -XPUT –data-urlencode value@flanneld-conf.json

[fedora@f21master ~]$ curl -L http://localhost:4001/v2/keys/ | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 221 0 221 0 0 33408 0 –:–:– –:–:– –:–:– 36833
“action”: “get”,
“node”: {
“createdIndex”: 11,
“key”: “/”,
“modifiedIndex”: 11,
“value”: “{n “Network”: “”,n “SubnetLen”: 24,n “Backend”: {n “Type”: “vxlan”n }n}nn”

Atomic Minions

Build latest F21 Atomic base, use virt platform of choice. Tested with KVM and EC2. Repeat for each Atomic minion.
[fedora@f21master ~]$ ssh sudo atomic upgrade
[fedora@f21master ~]$ ssh sudo systemctl reboot

[fedora@f21master ~]$ rpm -q etcd docker-io kubernetes
[fedora@f21master ~]$ ssh sudo rpm -q flannel etcd docker-io kubernetes

[fedora@f21master ~]$ ssh curl -L
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 221{“action”:”get”,”node”:{“key”:”/”,”value”:”{n “Network”: “”,n “SubnetLen”: 24,n “Backend”: {n “Type”: “vxlan”n }n}nn”,”modifiedIndex”:11,”createdIndex”:11}} 0 221 0 0 50769 0 –:–:– –:–:– –:–:– 73666

Atomic minion configuration, repeat on every minion.
[fedora@atomic01 ~]$ sudo vi /etc/sysconfig/flanneld

[fedora@atomic01 ~]$ sudo cp /usr/lib/systemd/system/docker.service /etc/systemd/system/
[fedora@atomic01 ~]$ sudo vi /etc/systemd/system/docker.service
After=flanneld.service docker.socket
Requires=flanneld.service docker.socket

ExecStartPre=-/usr/sbin/ip link del docker0
ExecStart=/usr/bin/docker -d -H fd:// –bip=${FLANNEL_SUBNET} –mtu=${FLANNEL_MTU} $OPTIONS $DOCKER_STORAGE_OPTIONS

[fedora@atomic01 ~]$ sudo vi /etc/kubernetes/kubelet
# The address for the info server to serve on (set to or “” for all interfaces)

# You may leave this blank to use the actual hostname

[fedora@atomic01 ~]$ sudo vi /etc/kubernetes/config
# Comma seperated list of nodes in the etcd cluster
[fedora@atomic01 ~]$ sudo systemctl daemon-reload

[fedora@atomic01 ~]$ sudo systemctl start flanneld docker kubelet kube-proxy

[fedora@atomic01 ~]$ ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP group default qlen 1000
link/ether 0a:45:46:8d:6a:de brd ff:ff:ff:ff:ff:ff
inet brd scope global dynamic eth0
valid_lft 3570sec preferred_lft 3570sec
inet6 fe80::845:46ff:fe8d:6ade/64 scope link
valid_lft forever preferred_lft forever
3: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8951 qdisc noqueue state UNKNOWN group default
link/ether 1a:50:6d:23:5d:a2 brd ff:ff:ff:ff:ff:ff
inet scope global flannel.1
valid_lft forever preferred_lft forever
inet6 fe80::1850:6dff:fe23:5da2/64 scope link
valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 56:84:7a:fe:97:99 brd ff:ff:ff:ff:ff:ff
inet scope global docker0
valid_lft forever preferred_lft forever

[ Repeat on all minions ]

Kubernetes testing on Atomic fleet, use the latest upstream guestbook example

[fedora@f21master ~]$ kubectl get minions
[fedora@f21master ~]$ git clone
[fedora@f21master ~]$ cd kubernetes/examples/guestbook
[fedora@f21master guestbook]$ kubectl create -f redis-master.json
[fedora@f21master guestbook]$ kubectl get pod redis-master
[fedora@f21master guestbook]$ kubectl create -f redis-master-service.json
[fedora@f21master guestbook]$ kubectl get service redis-master
[fedora@f21master guestbook]$ kubectl create -f redis-slave-controller.json
[fedora@f21master guestbook]$ kubectl get replicationController redisSlaveController
[fedora@f21master guestbook]$ kubectl get pods
redis-master dockerfile/redis name=redis-master Running
067a3550-9b39-11e4-bd02-0af36a4797bc brendanburns/redis-slave name=redisslave,uses=redis-master Pending
067a746a-9b39-11e4-bd02-0af36a4797bc brendanburns/redis-slave name=redisslave,uses=redis-master Pending

Add publicIPs line for an “external” service, match with eth0 IP of a minion
[fedora@f21master guestbook]$ cat frontend-service.json
“id”: “frontend”,
“kind”: “Service”,
“apiVersion”: “v1beta1”,
“port”: 80,
“publicIPs”: [“”],
“containerPort”: 80,
“selector”: {
“name”: “frontend”
“labels”: {
“name”: “frontend”

Leave a Reply

Your email address will not be published. Required fields are marked *