Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am simon-wessel on github.
  • I am simonwessel (https://keybase.io/simonwessel) on keybase.
  • I have a public key whose fingerprint is A562 0174 1EDF CEB2 082B 0E3D 7AA6 42A5 BB91 4964

To claim this, I am signing this object:

@simon-wessel
simon-wessel / aws-cni-addon.tf
Created November 17, 2023 11:17
Disabling AWS CNI using Terraform
# We add the addon with unfulfillable node selectors for the DaemonSet.
# When adding this addon before adding any nodes to the cluster, the AWS CNI will be disabled from the start.
# This is especially useful if you intend to install a CNI like Calico or Cilium.
# If you already have nodes in your cluster, you need to replace them.
# This is a hacky workaround, but it works and I prefer this solution to the local-exec provider until AWS adds a clean solution for this.
resource "aws_eks_addon" "vpc_cni" {
cluster_name = "my-cluster"
addon_name = "vpc-cni"
addon_version = data.aws_eks_addon_version.vpc_cni.version