After installing coreos (stable, beta or alpha) I can't start flanneld.service because of the dependency flannel-docker-opts.service fails. It's giving an error about
rm: unable to resolve the UUID from file: open /var/lib/coreos/flannel-wrapper2.uuid: no such file or directory
I'm new to coreos and am trying to install kubernetes on it; for that I have a separate etcd cluster stood up with SSL certs for them. I have an etcd proxy on the image up and running but flannel wont start for docker to run.
I'm not sure if I'm suppose to be including more configuration in my cloud-config to fix this or not. I can't seem to find anything on flannel-wrapper or flannel-docker-opts.service
Here's my cloud-config.yaml
#cloud-config
write_files:
- path: /run/systemd/system/etcd2.service.d/30-certificates.conf
permissions: 0644
content: |
[Service]
Environment="ETCD_CERT_FILE=/etc/ssl/etcd/client.pem"
Environment="ETCD_KEY_FILE=/etc/ssl/etcd/client-key.pem"
Environment="ETCD_TRUSTED_CA_FILE=/etc/ssl/etcd/ca.pem"
Environment="ETCD_PEER_CERT_FILE=/etc/ssl/etcd/client.pem"
Environment="ETCD_PEER_KEY_FILE=/etc/ssl/etcd/client-key.pem"
Environment="ETCD_PEER_TRUSTED_CA_FILE=/etc/ssl/etcd/ca.pem"
# Listen only on loopback interface.
Environment="ETCD_LISTEN_CLIENT_URLS=http://127.0.0.1:2379,http://127.0.0.1:4001"
hostname: "Kube-MST1"
ssh_authorized_keys:
- "ssh-rsa AAAAB3N....
coreos:
etcd2:
proxy: on
listen-client-urls: "http://127.0.0.1:2379"
initial-cluster: "ETCD1=http://192.168.1.7:2380,ETCD2=http://192.168.1.8:2380,ETCD3=http://192.168.1.9:2380"
fleet:
public-ip: "192.168.1.10"
metadata: "region=us-east"
etcd_servers: "http://127.0.0.1:2379"
etcd_cafile: /etc/ssl/etcd/ca.pem
etcd_certfile: /etc/ssl/etcd/client.pem
etcd_keyfile: /etc/ssl/etcd/client-key.pem
flannel:
etcd_prefix: "/coreos.com/network"
etcd_endpoints: "http://127.0.0.1:2379"
public-ip: "192.168.1.10"
interface: "192.168.1.10"
etcd_cafile: /etc/ssl/etcd/ca.pem
etcd_certfile: /etc/ssl/etcd/client.pem
etcd_keyfile: /etc/ssl/etcd/client-key.pem
update:
reboot-strategy: "etcd-lock"
units:
- name: 00-ens192.network
runtime: true
content: |
[Match]
Name=ens192
[Network]
DNS=192.168.1.100
DNS=192.168.1.101
Address=192.168.1.10/24
Gateway=192.168.1.1
- name: flanneld.service
command: start
drop-ins:
- name: 50-network-config.conf
content: |
[Service]
ExecStartPre=/usr/bin/etcdctl --endpoints http://127.0.0.1:2379 \ --ca-file /etc/ssl/etcd/ca.pem --cert-file /etc/ssl/etcd/client.pem --key-file /etc/ssl/etcd/client-key.pem \ set /coreos.com/network/config '{ "Network": "10.0.0.0/16" }'
- name: etcd2.service
command: start
- name: fleet.service
command: start
- name: docker.service
drop-ins:
- name: "50-insecure-registry.conf"
content: |
[Service]
Environment=DOCKER_OPTS='--insecure-registry="proxy.test.lab:8081"'
- name: docker.service
drop-ins:
- name: 51-docker-mirror.conf
content: |
[Unit]
Requires=flanneld.service
After=flanneld.service
Restart=always
command: start
- name: kubelet-unit.service
command: start
content: |
[Unit]
Requires=flanneld.service
After=flanneld.service
[Service]
Environment=KUBELET_VERSION=v1.5.3_coreos.0
Environment="RKT_OPTS=--uuid-file-save=/var/run/kubelet-pod.uuid \
--volume var-log,kind=host,source=/var/log \
--mount volume=var-log,target=/var/log \
--volume dns,kind=host,source=/etc/resolv.conf \
--mount volume=dns,target=/etc/resolv.conf"
ExecStartPre=/usr/bin/mkdir -p /var/log/containers
ExecStartPre=-/usr/bin/rkt rm --uuid-file=/var/run/kubelet-pod.uuid
ExecStart=/usr/lib/coreos/kubelet-wrapper \
--api-servers=http://127.0.0.1:8080 \
--register-schedulable=false \
--cni-conf-dir=/etc/kubernetes/cni/net.d \
--container-runtime=docker \
--allow-privileged=true \
--pod-manifest-path=/etc/kubernetes/manifests \
--hostname-override= 192.168.1.10 \
--cluster_dns= 10.9.0.100 \
--cluster_domain=cluster.local
ExecStop=-/usr/bin/rkt stop --uuid-file=/var/run/kubelet-pod.uuid
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target