You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*In the case that you determine you don't want to terminate the instance but you have already drained it, the cluster won't schedule any new pods to that node until you uncordon it:*
146
+
:::note
147
+
In the case that you determine you don't want to terminate the instance but you have already drained it, the cluster won't schedule any new pods to that node until you uncordon it:
145
148
-`k uncordon <node name>`
149
+
:::
146
150
147
151
## How do I upgrade a cluster to a new version of EKS?
148
152
149
-
Occasionally you may need to upgrade an EKS cluster. This is usually a pretty painless process, and there’s a ton of documentation online about it.
153
+
Occasionally you may need to upgrade an EKS cluster. This is usually a pretty painless process and there’s a ton of documentation online about it.
150
154
151
-
As part of this process you will need to upgrade the cluster itself, and some core components. Kubernetes has various applications that run as deployments or daemonsets in the kube-system namespace like coredns, kube-proxy and the AWS VPC CNI provider called aws-node.
155
+
As part of this process you will need to upgrade the cluster itself, and some core components. Kubernetes has various applications that run as deployments or daemonsets in the `kube-system` namespace like `coredns`, `kube-proxy` and the AWS VPC CNI provider called `aws-node`.
152
156
153
157
This document has great instructions on upgrading all of the different pieces, including listing the appropriate versions of the core components for each version of Kubernetes.
When doing this from terraform you should be able to go into the tf and change the version of the cluster. It should start the upgrade process, rather than tearing down the cluster and rebuilding it. This will make the cluster inaccessible through the AWS console for about 20 minutes, ***though everything in the cluster should continue to work normally, serve traffic, etc.***
161
+
When doing this from terraform you should be able to go into the tf and change the version of the cluster and addons and apply. It should start the upgrade process, rather than tearing down the cluster and rebuilding it. This will make the cluster inaccessible through the AWS console for about 20 minutes.
162
+
:::tip
163
+
Everything in the cluster should continue to work normally, serve traffic, etc. during this process because the worker nodes and all your workloads are not affected at this point.
164
+
:::
165
+
166
+
To get the latest version of the EKS addons, you can use these AWS CLI commands:
167
+
<Tabs
168
+
values={[
169
+
{label: 'vpc-cni', value: 'vpc-cni'},
170
+
{label: 'kube-proxy', value: 'kube-proxy'},
171
+
{label: 'coredns', value: 'coredns'},
172
+
]}
173
+
>
174
+
<TabItem value="vpc-cni">
175
+
The item marked with "True" is the default for that version.
- Update the AMI for the ASG to the AMI for the corresponding version of EKS in eks.tf and apply terraform
163
-
- See this page: [https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html)
164
-
- This should update the worker group, but not affect any of the running nodes
165
-
- Update any core components if necessary, as mentioned in the aws update-cluster documentation
166
-
- Run terraform apply
167
-
- Drain and remove the old nodes from the cluster. New ones will come up in their place with the new AMI
168
-
-`k get nodes`
169
-
-`k drain --ignore-daemonsets <node name>`
170
-
- Then terminate the instance in AWS Console
171
-
- Do the drain/delete process with one node at a time. Wait for a new node to be available before running the process on a second one. This will prevent any traffic from being lost.
213
+
- Update the addon versions versions in `<env>/main.tf` to match the correct versions for the new cluster version. See the tabs above or [read the AWS docs here](https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html)
214
+
- Update the `eks_cluster_version` in terraform
215
+
- Run `terraform apply`
216
+
- Update your nodes to the new version
217
+
-`aws eks update-nodegroup-version --cluster-name <cluster name> --nodegroup-name <cluster name>-main` ( if you've made changes, specify the correct node group here)
218
+
219
+
OR
172
220
221
+
- Go into the AWS EKS console and hit update under Configuration > Compute
173
222
223
+
This will bring up new nodes, gracefully drain your workloads onto them while preventing new pods from being scheduled to the old ones, then take down the old nodes. If your workloads are set up with multiple replicas there should be no downtime during this process.
Copy file name to clipboardExpand all lines: templates/docs/kubernetes.md
-28Lines changed: 0 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,34 +138,6 @@ This process can vary a bit depending on the amount of free resources you have a
138
138
*In the case that you determine you don't want to terminate the instance but you have already drained it, the cluster won't schedule any new pods to that node until you uncordon it:*
139
139
-`k uncordon <node name>`
140
140
141
-
## How do I upgrade a cluster to a new version of EKS?
142
-
143
-
Occasionally you may need to upgrade an EKS cluster. This is usually a pretty painless process, and there’s a ton of documentation online about it.
144
-
145
-
As part of this process you will need to upgrade the cluster itself, and some core components. Kubernetes has various applications that run as deployments or daemonsets in the kube-system namespace like coredns, kube-proxy and the AWS VPC CNI provider called aws-node.
146
-
147
-
This document has great instructions on upgrading all of the different pieces, including listing the appropriate versions of the core components for each version of Kubernetes.
When doing this from terraform you should be able to go into the tf and change the version of the cluster. It should start the upgrade process, rather than tearing down the cluster and rebuilding it. This will make the cluster inaccessible through the AWS console for about 20 minutes, ***though everything in the cluster should continue to work normally, serve traffic, etc.***
152
-
153
-
The process should be:
154
-
155
-
- Update the API version number in terraform
156
-
- Update the AMI for the ASG to the AMI for the corresponding version of EKS in eks.tf and apply terraform
157
-
- See this page: [https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html)
158
-
- This should update the worker group, but not affect any of the running nodes
159
-
- Update any core components if necessary, as mentioned in the aws update-cluster documentation
160
-
- Run terraform apply
161
-
- Drain and remove the old nodes from the cluster. New ones will come up in their place with the new AMI
162
-
-`k get nodes`
163
-
-`k drain --ignore-daemonsets <node name>`
164
-
- Then terminate the instance in AWS Console
165
-
- Do the drain/delete process with one node at a time. Wait for a new node to be available before running the process on a second one. This will prevent any traffic from being lost.
0 commit comments