Closed brokenmass closed 6 years ago
this issue seems to be fixed in kubeadm 1.10.3
, even though it will not automatically update the static etcd
pod as it recognise it as 'external'
I am using kubeadm 1.10.3
and have the same issues . My cluster is 1.10.2 with an external secure etcd
@brokenmass Does the values for your personnal fixes to the second cause you notice look like this :
caFile: /etc/kubernetes/pki/etcd/ca.crt
certFile: /etc/kubernetes/pki/etcd/healthcheck-client.crt
keyFile: /etc/kubernetes/pki/etcd/healthcheck-client.key
@detiber can you help please ?
@FloMedja in my case the values looks like :
caFile: /etc/kubernetes/pki/etcd/ca.pem
certFile: /etc/kubernetes/pki/etcd/client.pem
keyFile: /etc/kubernetes/pki/etcd/client-key.pem
and 1.10.3 is working correctly
@brokenmass So with kubeadm 1.10.3 everything work without no need of your personals fixes. In this case i am little confused. I have kubeadm 1.10.3 but the same error message that you mention in this bug report. I will double check my config may be i make some mistakes elsewhere
add here (or join kubernetes slack and send me a direct message) your kubeadm-config, etcd static pods yml and the full output of kubeadm upgrade plan
My apologies, I'm just now seeing this. @chuckha did the original work for the static-pod HA etcd docs, I'll work with him over the next couple of days to see if we can help straighten out the HA upgrades.
@detiber thanks you. the upgrade plan finally work. but i face some race conditions issues when tries to upgrade the cluster. sometime it work sometimes i hae the same error as kubernetes/kubeadm/issues/850 . kubeadm run into race condition when try to restart a pod on one node.
I ran into some snags getting a test env setup for this today and I'm running out of time before my weekend starts. I'll pick back up on this early next week.
/assign @chuckha @detiber
@chuckha @detiber @stealthybox any update on this?
So 1.9->1.10 HA upgrade was not a supported or vetted path.
We are currently in progress on updating our maintain our docs for 1.11->1.12 which we do plan to maintain going forwards.
BUG REPORT
Versions
kubeadm version: 1.10.2
Environment:
What happened?
A couple of months ago I created a kubernetes 1.9.3 HA cluster using
kubeadm 1.9.3
, following the 'official' documentation https://kubernetes.io/docs/setup/independent/high-availability/ , setting up theetcd
HA cluster hosting it on the master nodes using static podsI wanted to upgrade my cluster to
k8s 1.10.2
using the latestkubeadm
; after updatingkubeadm
, when runningkubeadm upgrade plan
, I got the following error:I investigate the issue and found the 2 root causes:
1)
kubeadm
doesn't identifyetcd
cluster as TLS enabledThe guide instruct to use the following command in the
etcd
static podkubeadm >= 1.10
checks (here: https://github.com/kubernetes/kubernetes/blob/release-1.10/cmd/kubeadm/app/util/etcd/etcd.go#L56) ifetcd
has TLS enabled by checking the presence of the following flags in the static pod command.but as the flags
--client-cert-auth
and--peer-client-cert-auth
are used in the instructions without any parameter (being booleans)kubeadm
didn’t recognise theetcd
cluster to have TLS enabled.PERSONAL FIX: I updated my
etcd
static pod command to use- --client-cert-auth=true
and- --peer-client-cert-auth=true
GENERAL FIX: Update the instructions to use
--client-cert-auth=true
and--peer-client-cert-auth=true
and relax kubeadm checks using"--peer-cert-file"
and"--peer-key-file"
(without the equals)2)
kubeadm
didn't use the correct certificatesafter fixing point 1, the problem still persisted as
kubeadm
was not using the right certificates. By following the kubeadm HA guide, in fact, the created certificates areca.pem
ca-key.pem
peer.pem
peer-key.pem
client.pem
client-key.pem
but the latestkubeadm
expectsca.crt
ca.key``peer.crt
peer.key``healthcheck-client.crt
healthcheck-client.key
instead. Yhekubeadm-config
MasterConfiguration keysetcd.caFile
,etcd.certFile
andetcd.keyFile
are ignored.PERSONAL FIX: Renamed
.pem
certificate to their.crt
and.key
equivalent and updated theetcd
static pod configuration to use them.GENERAL FIX: Use the
kubeadm-config
data.caFile
,data.certFile
anddata.keyFile
values, infer the right certificates from etcd static pod definition (pod path + volumes hostPath) and/or create a new temporary client certificate to use during the upgrade.What you expected to happen?
The upgrade plan should have been executed correctly
How to reproduce it (as minimally and precisely as possible)?
create a k8s ha cluster using
kubeadm 1.9.3
following https://kubernetes.io/docs/setup/independent/high-availability/ and try to update it tok8s >= 1.10
using the latestkubeadm