Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update apiserver certificate SANs with k8s master IPs #1556

Merged
merged 17 commits into from
Aug 18, 2020
Merged

Update apiserver certificate SANs with k8s master IPs #1556

merged 17 commits into from
Aug 18, 2020

Conversation

atsikham
Copy link
Contributor

@atsikham atsikham commented Aug 12, 2020

Bug #1520
Changes were made according to design spec. Important note that kubectl will act as before with private IPs if they were not used in ansible inventory, as initially k8s apiserver certificates have only SANs related to current node, for example

DNS:atsikham-update-kubernetes-master-vm-1, DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster.local, DNS:localhost, IP Address:10.96.0.1, IP Address:10.1.1.6

Cases that were tested:

  • HA cluster deployment from scratch
  • HA cluster update with old certificate SANs
  • HA cluster update with new certificate SANs
  • promotion to HA of single-master cluster that contains old certificate SANs

Tests were performed with 3-master k8s clusters.
To check that changes work as expected:

openssl x509 -in /etc/kubernetes/pki/apiserver.crt -text -noout | grep DNS:
openssl s_client -connect   <master_ip>:3446 | openssl x509 -noout -text | grep DNS: 

@atsikham atsikham marked this pull request as ready for review August 13, 2020 14:10
@atsikham atsikham changed the title Issue/kubectl update san Update apiserver certificate SANs with k8s master IPs Aug 13, 2020
jonmurphy407
jonmurphy407 previously approved these changes Aug 14, 2020
Copy link
Contributor

@sk4zuzu sk4zuzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have manually tested the following scenarios:

  • multi master deployment (3 instances) ✔️
  • single non-ha master deployment ✔️
  • promotion from single non-ha master ✔️
  • scaling up from single master to multi master (3 instances) ✔️

Code quality seems good, LGTM 👍.

@atsikham atsikham merged commit 379fb2c into hitachienergy:develop Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants