diff --git a/docs/infrastructure/kubernetes.version.md b/docs/infrastructure/kubernetes.version.md index acd2d245e..8e5f82806 100644 --- a/docs/infrastructure/kubernetes.version.md +++ b/docs/infrastructure/kubernetes.version.md @@ -69,4 +69,24 @@ Resources **Version bump deployments can take 10+ minutes** -6. Cycle out EC2 Nodes to the new version. +## Cycle out EC2 Nodes to the new version. + +1. Find the nodegroup name for the cluster + +```bash +aws eks list-nodegroups --cluster-name Workflows +``` + +2. Describe the nodegroup to validate the versions + +By describing the node group you can check the current version, or you can use `k get nodes` to see what version is currently running + +```bash +aws eks describe-nodegroup --cluster-name Workflows --nodegroup-name EksWorkflowsNodegroupCluste +``` + +3. Update the version to match + +```bash +aws eks update-nodegroup-version --cluster-name Workflows --nodegroup-name EksWorkflowsNodegroupCluste-OWsXxRuVz2B7 +``` diff --git a/infra/README.md b/infra/README.md index 25d54d357..2e641e735 100644 --- a/infra/README.md +++ b/infra/README.md @@ -110,3 +110,8 @@ The deployment of the K8s config is managed by GithubActions in [main](../.githu ## Troubleshoot - [DNS](../docs/dns.configuration.md) + +## Upgrading Kubernetes Versions + +Kubernetes upgrades very frequently to deploy a new version follow the +[Version Upgrade Guide](../docs/infrastructure/kubernetes.version.md) diff --git a/infra/eks/cluster.ts b/infra/eks/cluster.ts index 9ff904acb..e78a76769 100644 --- a/infra/eks/cluster.ts +++ b/infra/eks/cluster.ts @@ -1,4 +1,4 @@ -import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27'; +import { KubectlV28Layer } from '@aws-cdk/lambda-layer-kubectl-v28'; import { Aws, CfnOutput, Duration, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib'; import { InstanceType, IVpc, SubnetType, Vpc } from 'aws-cdk-lib/aws-ec2'; import { Cluster, ClusterLoggingTypes, IpFamily, KubernetesVersion, NodegroupAmiType } from 'aws-cdk-lib/aws-eks'; @@ -25,7 +25,7 @@ export class LinzEksCluster extends Stack { /* Cluster ID */ id: string; /** Version of EKS to use, this must be aligned to the `kubectlLayer` */ - version = KubernetesVersion.V1_27; + version = { version: '1.27' } as KubernetesVersion; /** Argo needs a temporary bucket to store objects */ tempBucket: Bucket; /* Bucket where read/write roles config files are stored */ @@ -65,7 +65,7 @@ export class LinzEksCluster extends Stack { defaultCapacity: 0, vpcSubnets: [{ subnetType: SubnetType.PRIVATE_WITH_EGRESS }], /** This must align to Cluster version: {@link version} */ - kubectlLayer: new KubectlV27Layer(this, 'KubeCtlLayer'), + kubectlLayer: new KubectlV28Layer(this, 'KubeCtlLayer'), /** To prevent IP exhaustion when running huge workflows run using ipv6 */ ipFamily: IpFamily.IP_V6, clusterLogging: [ClusterLoggingTypes.API, ClusterLoggingTypes.CONTROLLER_MANAGER, ClusterLoggingTypes.SCHEDULER], diff --git a/package-lock.json b/package-lock.json index be9b42c2a..65d575739 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "MIT", "devDependencies": { - "@aws-cdk/lambda-layer-kubectl-v27": "^2.0.0", + "@aws-cdk/lambda-layer-kubectl-v28": "^2.0.0", "@aws-sdk/client-cloudformation": "3.429.0", "@aws-sdk/client-eks": "3.429.0", "@aws-sdk/client-ssm": "3.429.0", @@ -52,10 +52,10 @@ "integrity": "sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==", "dev": true }, - "node_modules/@aws-cdk/lambda-layer-kubectl-v27": { + "node_modules/@aws-cdk/lambda-layer-kubectl-v28": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v27/-/lambda-layer-kubectl-v27-2.0.0.tgz", - "integrity": "sha512-BBh4ScPHaD82e7Z3PYXqyLjqfk/3/PRDTJW3x2j4l5f6sHXU041TaXKcFAGBHb1m4aq2UK+fwkIq95mgs3c0dg==", + "resolved": "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v28/-/lambda-layer-kubectl-v28-2.0.0.tgz", + "integrity": "sha512-IudB7xOD5zVivndESTSACA4rhOJtF5oduqI9y0yF/T5vACg16ToEWPUB0LKt3EQuXswxOlrak9mgnhNK33BHJA==", "dev": true, "peerDependencies": { "aws-cdk-lib": "^2.28.0", diff --git a/package.json b/package.json index 7c939b5f2..8f1930236 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@aws-sdk/client-cloudformation": "3.429.0", "@aws-sdk/client-eks": "3.429.0", "@aws-sdk/client-ssm": "3.429.0", - "@aws-cdk/lambda-layer-kubectl-v27": "^2.0.0", + "@aws-cdk/lambda-layer-kubectl-v28": "^2.0.0", "@linzjs/style": "^5.0.0", "aws-cdk": "2.93.x", "aws-cdk-lib": "2.93.x",