I'm struggling while following Kelsey Hightower's "Kubernetes the Hard Way" tutorial. I've gone off script, because I'm trying to bootstrap k8s on a local server.
I've got the point where I'm bootstrapping etcd, however, when I'm creating the service I'm getting an error:
Failed to start etcd.service: Unit is not loaded properly: Bad message.
See system logs and 'systemctl status etcd.service' for details.
Checking the logs and I get:
Jun 21 20:16:49 controller-0 systemd[1]: [/etc/systemd/system/etcd.service:9] Missing '='.
Jun 21 20:16:49 controller-0 systemd[1]: [/etc/systemd/system/etcd.service:9] Missing '='.
Jun 21 20:17:25 controller-0 systemd[1]: [/etc/systemd/system/etcd.service:9] Missing '='.
Here's the etcd.service file:
[Unit]
Description=etcd service
Documentation=https://github.com/coreos/etcd
[Service]
User=etcd
Type=notify
ExecStart=/usr/local/bin/etcd \\
--name ${ETCD_NAME} \\
--data-dir /var/lib/etcd \\
--initial-advertise-peer-urls http://${ETCD_HOST_IP}:2380 \\
--listen-peer-urls http://${ETCD_HOST_IP}:2380 \\
--listen-client-urls http://${ETCD_HOST_IP}:2379,http://127.0.0.1:2379 \\
--advertise-client-urls http://${ETCD_HOST_IP}:2379 \\
--initial-cluster-token etcd-cluster-1 \\
--initial-cluster etcd-1=http://192.168.0.7:2380 \\
--initial-cluster-state new \\
--heartbeat-interval 1000 \\
--election-timeout 5000
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target