Skip to content

Instantly share code, notes, and snippets.

@bdenning
Last active March 22, 2016 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdenning/db264b8f2373ac0fc31a to your computer and use it in GitHub Desktop.
Save bdenning/db264b8f2373ac0fc31a to your computer and use it in GitHub Desktop.
#cloud-config
password: atomic
ssh_pwauth: True
chpasswd: { expire: False }
write_files:
- path: /etc/sysconfig/docker
content: |
OPTIONS='--selinux-enabled --log-driver=journald --registry-mirror=http://k8s.example.local:5000'
DOCKER_CERT_PATH=/etc/docker
- path: /etc/sysconfig/flanneld
content: |
FLANNEL_ETCD="http://k8s.example.local:2379"
FLANNEL_ETCD_KEY="/atomic01/network/"
- path: /etc/kubernetes/kubelet
content: |
KUBELET_ADDRESS="--address=0.0.0.0"
KUBELET_PORT="--port=10250"
KUBELET_API_SERVER="--api_servers=http://k8s.example.local:8080"
- path: /etc/kubernetes/config
content: |
KUBE_LOGTOSTDERR="--logtostderr=true"
KUBE_LOG_LEVEL="--v=0"
KUBE_ALLOW_PRIV="--allow_privileged=false"
KUBE_MASTER="--master=http://k8s.example.local:8080"
- path: /etc/systemd/system/docker.service.d/10-flanneld-network.conf
content: |
[Unit]
After=flanneld.service
Requires=flanneld.service
[Service]
EnvironmentFile=/run/flannel/subnet.env
ExecStartPre=-/usr/sbin/ip link del docker0
ExecStart=
ExecStart=/usr/bin/docker -d --bip=${FLANNEL_SUBNET} --mtu=${FLANNEL_MTU} $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $INSECURE_REGISTRY
runcmd:
- systemctl daemon-reload
- systemctl enable docker flanneld kubelet kube-proxy
- reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment