2018-04-16 05:40:00 +02:00
|
|
|
#cloud-config
|
|
|
|
write_files:
|
|
|
|
- path: /etc/etcd/etcd.conf
|
|
|
|
content: |
|
|
|
|
ETCD_NAME=${etcd_name}
|
|
|
|
ETCD_DATA_DIR=/var/lib/etcd
|
|
|
|
ETCD_ADVERTISE_CLIENT_URLS=https://${etcd_domain}:2379
|
|
|
|
ETCD_INITIAL_ADVERTISE_PEER_URLS=https://${etcd_domain}:2380
|
|
|
|
ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:2379
|
|
|
|
ETCD_LISTEN_PEER_URLS=https://0.0.0.0:2380
|
|
|
|
ETCD_LISTEN_METRICS_URLS=http://0.0.0.0:2381
|
|
|
|
ETCD_INITIAL_CLUSTER=${etcd_initial_cluster}
|
|
|
|
ETCD_STRICT_RECONFIG_CHECK=true
|
|
|
|
ETCD_TRUSTED_CA_FILE=/etc/ssl/certs/etcd/server-ca.crt
|
|
|
|
ETCD_CERT_FILE=/etc/ssl/certs/etcd/server.crt
|
|
|
|
ETCD_KEY_FILE=/etc/ssl/certs/etcd/server.key
|
|
|
|
ETCD_CLIENT_CERT_AUTH=true
|
|
|
|
ETCD_PEER_TRUSTED_CA_FILE=/etc/ssl/certs/etcd/peer-ca.crt
|
|
|
|
ETCD_PEER_CERT_FILE=/etc/ssl/certs/etcd/peer.crt
|
|
|
|
ETCD_PEER_KEY_FILE=/etc/ssl/certs/etcd/peer.key
|
|
|
|
ETCD_PEER_CLIENT_CERT_AUTH=true
|
|
|
|
- path: /etc/systemd/system/kubelet.service.d/10-typhoon.conf
|
|
|
|
content: |
|
|
|
|
[Unit]
|
|
|
|
Wants=rpc-statd.service
|
|
|
|
[Service]
|
|
|
|
ExecStartPre=/bin/mkdir -p /opt/cni/bin
|
|
|
|
ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests
|
|
|
|
ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d
|
|
|
|
ExecStartPre=/bin/mkdir -p /etc/kubernetes/checkpoint-secrets
|
|
|
|
ExecStartPre=/bin/mkdir -p /etc/kubernetes/inactive-manifests
|
|
|
|
ExecStartPre=/bin/mkdir -p /var/lib/cni
|
|
|
|
ExecStartPre=/bin/mkdir -p /var/lib/kubelet/volumeplugins
|
|
|
|
ExecStartPre=/usr/bin/bash -c "grep 'certificate-authority-data' /etc/kubernetes/kubeconfig | awk '{print $2}' | base64 -d > /etc/kubernetes/ca.crt"
|
|
|
|
Restart=always
|
|
|
|
RestartSec=10
|
|
|
|
- path: /etc/kubernetes/kubelet.conf
|
|
|
|
content: |
|
2018-06-28 07:47:35 +02:00
|
|
|
ARGS="--anonymous-auth=false \
|
2018-05-14 08:20:42 +02:00
|
|
|
--authentication-token-webhook \
|
|
|
|
--authorization-mode=Webhook \
|
2018-04-16 05:40:00 +02:00
|
|
|
--client-ca-file=/etc/kubernetes/ca.crt \
|
|
|
|
--cluster_dns=${k8s_dns_service_ip} \
|
|
|
|
--cluster_domain=${cluster_domain_suffix} \
|
|
|
|
--cni-conf-dir=/etc/kubernetes/cni/net.d \
|
|
|
|
--exit-on-lock-contention \
|
|
|
|
--kubeconfig=/etc/kubernetes/kubeconfig \
|
|
|
|
--lock-file=/var/run/lock/kubelet.lock \
|
|
|
|
--network-plugin=cni \
|
|
|
|
--node-labels=node-role.kubernetes.io/master \
|
|
|
|
--node-labels=node-role.kubernetes.io/controller="true" \
|
|
|
|
--pod-manifest-path=/etc/kubernetes/manifests \
|
2018-05-14 03:16:10 +02:00
|
|
|
--read-only-port=0 \
|
2018-04-16 05:40:00 +02:00
|
|
|
--register-with-taints=node-role.kubernetes.io/master=:NoSchedule \
|
|
|
|
--volume-plugin-dir=/var/lib/kubelet/volumeplugins"
|
|
|
|
- path: /etc/kubernetes/kubeconfig
|
|
|
|
permissions: '0644'
|
|
|
|
content: |
|
|
|
|
${kubeconfig}
|
2018-04-18 08:31:09 +02:00
|
|
|
- path: /var/lib/bootkube/.keep
|
2018-04-26 06:33:26 +02:00
|
|
|
- path: /etc/NetworkManager/conf.d/typhoon.conf
|
|
|
|
content: |
|
|
|
|
[main]
|
|
|
|
plugins=keyfile
|
|
|
|
[keyfile]
|
|
|
|
unmanaged-devices=interface-name:cali*;interface-name:tunl*
|
2018-04-16 05:40:00 +02:00
|
|
|
- path: /etc/selinux/config
|
|
|
|
owner: root:root
|
|
|
|
permissions: '0644'
|
|
|
|
content: |
|
|
|
|
SELINUX=permissive
|
|
|
|
SELINUXTYPE=targeted
|
|
|
|
bootcmd:
|
|
|
|
- [setenforce, Permissive]
|
|
|
|
- [systemctl, disable, firewalld, --now]
|
2018-04-26 03:55:51 +02:00
|
|
|
# https://github.com/kubernetes/kubernetes/issues/60869
|
|
|
|
- [modprobe, ip_vs]
|
2018-04-16 05:40:00 +02:00
|
|
|
runcmd:
|
|
|
|
- [systemctl, daemon-reload]
|
2018-04-26 06:33:26 +02:00
|
|
|
- [systemctl, restart, NetworkManager]
|
2018-10-13 22:14:37 +02:00
|
|
|
- "atomic install --system --name=etcd quay.io/poseidon/etcd:v3.3.10"
|
2018-12-15 20:43:44 +01:00
|
|
|
- "atomic install --system --name=kubelet quay.io/poseidon/kubelet:v1.13.1"
|
2018-11-07 08:35:11 +01:00
|
|
|
- "atomic install --system --name=bootkube quay.io/poseidon/bootkube:v0.14.0"
|
2018-04-16 05:40:00 +02:00
|
|
|
- [systemctl, start, --no-block, etcd.service]
|
|
|
|
- [systemctl, start, --no-block, kubelet.service]
|
|
|
|
users:
|
|
|
|
- default
|
|
|
|
- name: fedora
|
|
|
|
gecos: Fedora Admin
|
|
|
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
|
|
|
groups: wheel,adm,systemd-journal,docker
|
|
|
|
ssh-authorized-keys:
|
|
|
|
- "${ssh_authorized_key}"
|