> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon Elastic Kubernetes Services (EKS) upgrade guide

This topic describes how to upgrade Kubernetes in your [Amazon Elastic Kubernetes Service (EKS)](https://aws.amazon.com/eks/) Domino deployment. EKS is hosted on [Amazon Web Services (AWS)](https://aws.amazon.com/what-is-aws/).

<Warning>
  * Immediately after the Kubernetes upgrade, you must [upgrade Domino](/6.3/admin/operations/upgrade-domino) to a [compatible version of Kubernetes](/6.3/admin/architecture-and-deployment/kubernetes-infrastructure/kubernetes-compatibility). Domino will not work as expected until this is completed.

    For example, after upgrading Kubernetes to v1.22, you must upgrade to Domino v5.2 or later. Kubernetes v1.22 is not compatible with older versions of Domino. Similarly, after upgrading to Kubernetes 1.23 or 1.24, you must upgrade to Domino v5.3 or later.

  * The CDK automation at [cdk-cf-eks](https://github.com/dominodatalab/cdk-cf-eks) has been deprecated. If you have infrastructure provisioned with CDK you will need to migrate to Terraform using the [CDK to Terraform convert](https://github.com/dominodatalab/cdk-cf-eks/tree/master/convert) utility, before upgrading to Kubernetes 1.25.
</Warning>

## Terraform

If you deployed your infrastructure using the [terraform-aws-eks](https://github.com/dominodatalab/terraform-aws-eks) module version v3.0.1 or above, follow [Upgrading K8s](https://github.com/dominodatalab/terraform-aws-eks/tree/main/examples/deploy#kubernetes-upgrade). Otherwise, there are 2 options:

1. Upgrade the module to version v3 using [State Migration](https://github.com/dominodatalab/terraform-aws-eks/tree/main/bin/state-migration), then follow [Upgrading K8s](https://github.com/dominodatalab/terraform-aws-eks/tree/main/examples/deploy#kubernetes-upgrade).

2. Follow the instructions below to perform the update with prior versions.

Review the prerequisites

To upgrade Kubernetes on a Terraform-provisioned cluster you must have the following files used/created during the cluster creation:

* Terraform state file: `terraform.tfstate`

* Variables file: `domino-terraform.auto.tfvars`

* Terraform configuration file: `main.tf`

You’ll also need a Unix or Linux terminal with the following:

* [Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) installed with an active session (see the [Terraform module requirements](https://github.com/dominodatalab/terraform-aws-eks#requirements) for compatible versions).

* [Amazon Web Services Command Line Interface (AWS CLI)](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) installed.

Update cluster and node\_groups

1. Set AWS credentials in the environment:

   ```shell theme={null}
   export AWS_ACCESS_KEY_ID='_FILL_ME_IN_'
   export AWS_SECRET_ACCESS_KEY='_FILL_ME_IN_'
   export AWS_REGION='_FILL_ME_IN_'
   ```

2. Validate that there are no pending changes:

   ```shell theme={null}
   terraform plan
   ```

   The following message indicates no pending changes:

   ```
   No changes. Your infrastructure matches the configuration.
   ```

3. Open the `domino-terraform.auto.tfvars` file and add/edit the `k8s_version` attribute with the desired Kubernetes version:

   ```shell theme={null}
   k8s_version = '_FILL_ME_IN_'
   ```

   <Note>
     If you are using custom images for the node groups you will need to provide the appropriate Amazon Machine Image (AMI).
   </Note>

4. Validate the desired changes:

   ```shell theme={null}
   terraform plan -out=terraform.plan
   ```

5. Update the cluster and `node_groups`:

   ```shell theme={null}
   terraform apply terraform.plan
   ```

The upgrade takes some time as `terraform apply` performs these actions:

* The control plane is upgraded to the desired version.

* The latest `amazon-eks-node` version is retrieved and applied to the `managed-node-groups`. The update is detailed in [Managed nodes update behavior](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-update-behavior.html).
