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

Add runbook for upgrade eks addons #5222

Merged
merged 6 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions runbooks/source/upgrade-eks-addons.html.md.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: Upgrade EKS addons
weight: 53
last_reviewed_on: 2024-01-24
review_in: 3 months
---

# Upgrade EKS addons

We have 3 addons managed through cloud-platform-terraform-eks-add-ons [module](https://github.com/ministryofjustice/cloud-platform-terraform-eks-add-ons).

Before every EKS major versions, check and upgrade if the addons versions don't match the EKS major version the cluster is currently on.
mikebell marked this conversation as resolved.
Show resolved Hide resolved

After every EKS major versions, check and upgrade if the addons don't match the EKS major version the cluster you just upgraded to.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
After every EKS major versions, check and upgrade if the addons don't match the EKS major version the cluster you just upgraded to.
After every EKS major version upgrade, check and upgrade if the addons don't match the EKS major version the cluster you just upgraded to.


The following addons are managed through cloud-platform-terraform-eks-add-ons module.

[managing-kube-proxy](https://docs.aws.amazon.com/eks/latest/userguide/managing-kube-proxy.html)

[managing-coredns](https://docs.aws.amazon.com/eks/latest/userguide/managing-coredns.html)

[managing-vpc-cni](https://docs.aws.amazon.com/eks/latest/userguide/managing-vpc-cni.html)

## Listing available EKS upgrades

### eksctl Install

```
brew install eksctl
```

Run the following command to get a list of supported addon version for the Kubernetes version.

```
eksctl utils describe-addon-versions --kubernetes-version [k8s-version] --name [addon name: kube-proxy/vpc-cni/coredns] | grep AddonVersion
```

## Preparing for upgrade

Check the changelog for each of the addons and determine if there are any breaking changes.

Create a thread in #cloud-platform notifying the team that upgrades are starting and the pipelines will be paused.

## Starting the upgrade

1. Bump the version number in cloud-platform-terraform-eks-add-ons
2. Commit changes on a new branch and create a pull request
3. Request review from someone on the team
4. Merge pull request and create a new release through the Github UI
5. Bump the version number of the cloud-platform-terraform-eks-add-ons in cloud-platform-infrastructure
6. Commit changes on a new branch and create a pull request
7. Request review form someone on the team
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
7. Request review form someone on the team
7. Request review from someone on the team

8. Check the terraform plan in concourse and pause the following pipelines:
* bootstrap
* infrastructure-live
* infrastructure-manager
* infrastructure-live-2
9. Create an output of the configuration of a pod before the upgrade. `kubectl -n kube-system get pod $addon -oyaml` there is also a helper [script](https://github.com/ministryofjustice/cloud-platform-infrastructure/blob/main/scripts/addons-upgrade.bash).
10. Merge the pull request
11. Unpause an infrastructure pipeline and wait for it to complete
12. While running:
* Keep an eye on pods recycling `watch -n 1 "kubectl -n kube-system get pods"`
* Keep an eye on events `watch -n 1 "kubectl -n kube-system get events"`
13. Run the reporting pipeline on the infrastructure environment
14. If everythin is green repeat steps 11-14 on each environment.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
14. If everythin is green repeat steps 11-14 on each environment.
14. If everything is green repeat steps 11-14 on each environment.


## Finish the upgrade

Finish up communications and close the thread.
4 changes: 2 additions & 2 deletions runbooks/source/upgrade-eks-cluster.html.md.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Upgrade EKS cluster
weight: 53
last_reviewed_on: 2024-01-16
last_reviewed_on: 2024-01-24
review_in: 3 months
---

Expand Down Expand Up @@ -155,7 +155,7 @@ Before every EKS major versions, check and upgrade if the addons versions don't

After every EKS major versions, check and upgrade if the addons don't match the EKS major version the cluster you just upgraded to.

The following addons are managed through cloud-platform-terraform-eks-add-ons [module](
The following addons are managed through cloud-platform-terraform-eks-add-ons module.

[managing-kube-proxy](https://docs.aws.amazon.com/eks/latest/userguide/managing-kube-proxy.html)

Expand Down
Loading