Migrate k8s data to etcd3 api store

Default backend is now etcd3 (was etcd2).
The migration process consists of the following steps:
* check if migration is necessary
* stop etcd on first etcd server
* run migration script
* start etcd on first etcd server
* stop kube-apiserver until configuration is updated
* update kube-apiserver
* purge old etcdv2 data
This commit is contained in:
Matthew Mosesohn
2017-03-06 13:22:13 +03:00
parent 4038954f96
commit 804e9a09c0
4 changed files with 62 additions and 5 deletions

View File

@@ -0,0 +1,6 @@
---
- name: "Post-upgrade | etcd3 upgrade | purge etcd2 k8s data"
command: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_access_addresses }} rm -r /registry"
environment:
ETCDCTL_API: 2
when: kube_apiserver_storage_backend == "etcd3" and needs_etcd_migration|bool|default(false)