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

Upgrade to Kubernetes 1.24 #3387

Closed
32 tasks done
lemeurherve opened this issue Feb 14, 2023 · 3 comments
Closed
32 tasks done

Upgrade to Kubernetes 1.24 #3387

lemeurherve opened this issue Feb 14, 2023 · 3 comments

Comments

@lemeurherve
Copy link
Member

lemeurherve commented Feb 14, 2023

Previous upgrade: #3053

  • Upgrade kubectl within docker-helmfile

  • Send an email (ideally 1-2 day priori to the operations) on both jenkinsci-dev and jenkins-infra mailing lists (google groups) to let users known "when" the operations will take place, and "what" will be the expected impacts

  • Upgrade DOKS (doks and doks-public)

    • [-] Open datetime announcement on status.jenkins.io for doks-public
    • [-] Disable cluster in ci.jenkins.io configuration as code
    • Disable kubernetes management (disable job on infra.ci.jenkins.io)
    • Bump Kubernetes version in jenkins-infra/digitalocean
    • Ensure cluster is re-created by terraform in jenkins-infra/digitalocean updated in DigitalOcean management interface
    • Re-Enable kubernetes management (and update kubeconfigs in the infra.ci's SOPS credentials (private repo), if kubernetes management cannot connect) and run a job on the main branch
    • Add the credential of the service account jenkins-agents in ci.jenkins.io if needed (manual step) doks only not doks-public
    • [-] Close announcement
  • Upgrade EKS (cik8s and eks-public)

  • Upgrade AKS (privatek8s, publick8s and prodpublick8s)

    • [-] Check previous AKS upgrades and create one for 1.24

    • Open datetime announcement on status.jenkins.io

    • Disable kubernetes management (disable job on infra.ci.jenkins.io)

    • Upgrade privatek8s first
      ⚠️ It will put infra.ci out of service so might need manual steps to re-boostrap the kubernetes-management job

      • Version retrieved with az aks get-upgrades --resource-group prod-privatek8s --name privatek8s-emerging-ram --output table

      • Control plane upgraded with terraform

      • Nodes upgraded via the Azure Portal (for now)

        Details image
    • Upgrade publick8s

    • Upgrade prodpublick8s

    • Re-Enable kubernetes management (and update kubeconfigs in the infra.ci's SOPS credentials (private repo), if kubernetes management cannot connect) and run a job on the main branch

    • Send an email on both jenkinsci-dev and jenkins-infra mailing lists to announce the end of maintenance

    • Close announcement

@github-actions
Copy link

Take a look at these similar issues to see if there isn't already a response to your problem:

  1. 92% Upgrade to Kubernetes 1.22 #2930
  2. 92% Upgrade to Kubernetes 1.21 #2866
  3. 77% [INFRA-3118] Upgrade to Kubernetes 1.20 #2664

@dduportal
Copy link
Contributor

dduportal commented Feb 22, 2023

We had an issue while upgrading cik8s on EKS with the following error message during the addons upgrade:

error updating EKS Add-On (<redacted>:aws-ebs-csi-driver): AccessDeniedException: User is not authorized to perform this action

Thanks to @lemeurherve 's researches, we found terraform-aws-modules/terraform-aws-eks#1725 which confirms that the Terraform EKS module is (was?) not exhaustive for the IAM eks required permissions.
We covered https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelastickubernetesservice.html#amazonelastickubernetesservice-actions-as-permissions exhaustively to apply the missing permissions (mainly: eks:UpdateAddon 😅 but not only).

Applied the new permissions in the (private) repository jenkins-infra/terraform-state (ref. https://github.com/jenkins-infra/terraform-states/commit/14c134bdb778e7a6124ed398618c1a9f48cbf101) and triggered a new (successful) build.

@lemeurherve
Copy link
Member Author

Upgrade of all our clusters to Kubernetes 1.24 successful 🎉

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants