-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
What were you trying to accomplish?
Spin up a load balancer using service type LoadBalancer
.
What happened?
Got error:
Error syncing load balancer: failed to ensure load balancer: Multiple untagged security groups found for instance i-0c1530b0b6a60209e; ensure the k8s security group is tagged
The eksctl command is creating two security groups for my ec2 instances but without tags required for load balancer creation, this one: kubernetes.io/cluster/${var.cluster_name}
How to reproduce it?
Create a eksctl using this command below.
eksctl create cluster -f - <<EOF
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: ${CLUSTER_NAME}
region: ${AWS_DEFAULT_REGION}
version: "${K8S_VERSION}"
tags:
karpenter.sh/discovery: ${CLUSTER_NAME}
iam:
withOIDC: true
podIdentityAssociations:
- namespace: "${KARPENTER_NAMESPACE}"
serviceAccountName: karpenter
roleName: ${CLUSTER_NAME}-karpenter
permissionPolicyARNs:
- arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:policy/KarpenterControllerPolicy-${CLUSTER_NAME}
iamIdentityMappings:
- arn: "arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/KarpenterNodeRole-${CLUSTER_NAME}"
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
## If you intend to run Windows workloads, the kube-proxy group should be specified.
# For more information, see https://github.com/aws/karpenter/issues/5099.
# - eks:kube-proxy-windows
managedNodeGroups:
- instanceType: m5.large
amiFamily: AmazonLinux2
name: ${CLUSTER_NAME}-ng
desiredCapacity: 2
minSize: 1
maxSize: 10
addons:
- name: eks-pod-identity-agent
EOF
Versions
eksctl version: 0.210.0
kubectl version: v1.33.2
OS: darwin