Closed nicolasbrieussel closed 1 month ago
if you do not let EKS deploy the VPC CNI, CoreDNS, and kube-proxy, then its up to you to deploy their replacements that will fulfill the functionality they provide
Closing since this isn't a module issue but user configuration error
If I don't configure those component, yes of course nothing will works within my cluster. But I don't see why it should block my node to join the cluster and the terraform to run successfully.
Currently, I do this on my cluster, with bootstrap = true
resource "helm_release" "cilium" {
count = var.controllers.create && var.controllers.cilium.create ? 1 : 0
depends_on = [module.eks]
name = "cilium"
namespace = var.controllers.cilium.namespace
repository = var.controllers.cilium.repository
chart = var.controllers.cilium.chart
version = var.controllers.cilium.version
values = [
# This files was generated via `cilium install --helm-auto-gen-values cilium.yaml --cluster-name default`,
# and modified to be generic.
# Comment this resource and rerun this command if changing the version.
file("${path.module}/2.4.0-controller-cilium_values.yaml")
]
}
resource "null_resource" "cilium_setup" {
count = var.controllers.create && var.controllers.cilium.create ? 1 : 0
depends_on = [module.eks, helm_release.cilium]
triggers = {
region = data.aws_region.current.name
cluster_id = module.eks.cluster_name
}
provisioner "local-exec" {
when = create
command = "export AWS_ACCESS_KEY_ID=XXXX; export AWS_SECRET_ACCESS_KEY=XXXX; aws eks update-kubeconfig --region ${data.aws_region.current.name} --name ${module.eks.cluster_name}; kubectl delete daemonsets.apps -n kube-system aws-node --ignore-not-found; kubectl delete --all pods --all-namespaces"
}
}
And it's works fine (Although it's ugly). It just install cilium, remove vpc-cni, and restart all my node to be sure they are all managed by cilium. I expected to be able to do something similar with bootstrap=false, but without the ugly hack.
Also, I don't see why you considere it as a user configuration error. I mean, node able to be created and join the cluster should have nothing to do with addons...no?
Edit : I just read the doc again about this parameter, just to be sure.
According to what I understand, setting this parameter to false means I will have to manage it myself, by any means I choose. But how do I do this if it prevent me to have a working cluster where I could install stuff on?
I get exactly the same behavior with this PR: The nodes are unhealthy and never join the cluster. Therefore I'm not able to deploy Cilium. Please tell me if you found something @nicolasbrieussel . Otherwise I'll have to stick to my previous methode (deleting the aws-node ds).
Update: I managed to get it work just by changing the dependencies. Indeed, I don't need the whole eks module to be deployed but just the eks_cluster.
depends_on = [module.eks.eks_cluster]
That way the helm release Cilium is able to run and the nodes are joining the cluster.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
I'm currently facing an issue, when I try to spawn an EKS without vpc-cni and other addons. I just tried the newly added variable
bootstrap_self_managed_addons = false
, but then, my node group is unable to spawn properly.Turning back the variable to true makes it work again (but with the addons 😒)
Versions
Module version 20.24.1
Terraform version: Terraform v1.9.1 on darwin_arm64
Provider version(s): Terraform v1.9.1 on darwin_arm64
Reproduction Code [Required]
Steps to reproduce the behavior:
Just run the reproduction code above
Expected behavior
A working, healthy and increadible EKS (without aws-vpc-cni 🍌)
Actual behavior
A cluster without node, as the node_group failed to be healthy
Terminal Output Screenshot(s)
Additional context
I do run my terraform from a workspace, from a module. I didn't mention it before, as it should not have an impact, but just in case ^^