I am going through the documentation for running coreos on GCE and have some questions regarding use.
1. How do I use etcd v3 on GCE to setup the flannel backend?
I have followed the instructions here:
But that only allows for the creation of etcd Version: 2.3.7.
Is there any updated documentation?
2. How do I setup etcd v3 on GCE using a cloud config file?
I have tried to create a an upgraded cluster using a cloud config file as follows:
#cloud-config
coreos:
etcd:
advertise_client_urls: "http://$INTERNAL_IP:2379"
However, that file does not validate in the online cloud config validator:
deprecated key "advertise_client_urls" (etcd2 options no longer work for etcd)
deprecated key "listen_client_urls" (etcd2 options no longer work for etcd)
When I create a new coreos instance on GCE I get the following when I run etcd2:
2017-05-29 09:00:12.518926 I | etcdmain: etcd Version: 2.3.7
2017-05-29 09:00:12.518979 I | etcdmain: Git SHA: fd17c91
2017-05-29 09:00:12.518983 I | etcdmain: Go Version: go1.7.6
2017-05-29 09:00:12.518986 I | etcdmain: Go OS/Arch: linux/amd64
2017-05-29 09:00:12.518990 I | etcdmain: setting maximum number of CPUs to 1, total number of available CPUs is 1
2017-05-29 09:00:12.518994 W | etcdmain: no data-dir provided, using default data-dir ./default.etcd
2017-05-29 09:00:12.522942 C | etcdmain: cannot access data directory: mkdir default.etcd: permission denied
3. How do I manage etcd versions as they are both setup as services?
On any GCE instance, when I run:
export ETCDCTL_API=3
etcdctl version
The api does not use the updated version.
It says here:
That using a cloud config file to configure etcd creates a drop in but I do not see a drop in the location indicated:
/etc/systemd/system/etcd-member.service.d/20-clct-etcd-member.conf
In /usr/lib/systemd/system/ there are the etcd-member.service and etcd2.service
Etcd2.service is as follows:
Environment=ETCD_DATA_DIR=/var/lib/etcd2
WantedBy=multi-user.target
etcd-member.service is as follows:
Description=etcd (System Application Container)
Environment="ETCD_IMAGE_TAG=v3.1.6"
Environment="ETCD_NAME=%m"
Environment="ETCD_USER=etcd"
Environment="ETCD_DATA_DIR=/var/lib/etcd"
Environment="RKT_RUN_ARGS=--uuid-file-save=/var/lib/coreos/etcd-member-wrapper.uuid"
ExecStartPre=/usr/bin/mkdir --parents /var/lib/coreos
ExecStartPre=-/usr/bin/rkt rm --uuid-file=/var/lib/coreos/etcd-member-wrapper.uuid
ExecStart=/usr/lib/coreos/etcd-wrapper $ETCD_OPTS
ExecStop=-/usr/bin/rkt stop --uuid-file=/var/lib/coreos/etcd-member-wrapper.uuid
WantedBy=multi-user.target