-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EKS] [request]: Kubernetes Restricted Label support for Managed Node Groups #1451
Comments
I note that the same restriction exists for taints - "Taint cannot contain reserved prefixes [kubernetes.io/, k8s.io/, eks.amazonaws.com/]" |
That's interesting, because the Kubernetes-side changes do not block taints, only labels. It makes sense for the EKS API to reserve their own prefix ( That said, the well-known taints are temporary taints in the |
Any updates on this? Cluster: v1.21 I'm still receiving the following error:
I understand the rationale behind not enabling full control over these labels with known prefixes but at the same time there should at least be a way to set a node role via an API call when setting up the managed node group. This helps quite a bit when running |
Managed Node groups also are not automatically labeling with the |
That's interesting, So that is actually a different problem, and if it's failing in the Managed Node Groups API, i.e. like #1451 (comment), then that probably should be opened as a new feature request/bug report. This ticket was for providing a way in EKS to set the labels that the kubelet is not allowed to self-set, e.g., |
Looks like the EKS Managed Node Group API blocks anything in those prefixes, not just the root. |
this blocks people from following this |
@pascalwhoop That's a different problem, unless you're using one of the restricted labels for scaling (in which case, this would also affect vanilla k8s, and is probably making things harder for yourself, compared to using a local or locally-owned label). For scale-from-zero on EKS Managed Node Groups, #724 (comment) links to the CA built-in support for that, introduced in EKS k8s 1.24. The FAQ you're looking at is for AWS-hosted non-Managed Node Groups, i.e. when the ASG is being managed directly by the user or infrastructure tooling, or via something like CloudFormation. It's a shame the FAQ wasn't updated when the MNG support was added, maybe worth filing a bug with CA? The AWS-specific documentation talks about the MNG support for scaling from zero nodes, but probably could be clearer that if you're using the |
Check out a simple workaround here: https://hub.docker.com/repository/docker/enver/label-nodes/general |
Stumbled on this issue when attempting to implement Node Restriction via the https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-isolation-restriction |
That's indeed a general version of this issue. At this time, MNG relies on Nodes to self-set their labels on connection, and the whole point of the Node Restriction admission controller is to provide a set of labels that nodes cannot self-set, in order to support labels that are administrator validated. kubernetes/cloud-provider-aws#110 was intended to provide a way to support elastic scaling and still be able to attach labels to nodes that are safe from rouge nodes or compromised nodes (since Cloud Provider AWS is already authenticating nodes against EC2 or ASG AFAIR), but it closed to due to lack of implementation interest. |
Is there any updates? |
Community Note
Tell us about your request
The Managed Node Groups API current rejects labels with prefixes containing
kubernetes.io/
,k8s.io/
,eks.amazonaws.com/
. I haven't checked, but I assume this is actually matching the behaviour of the NodeRestriction Admission Controller with the addition ofeks.amazonaws.com/
as a further restricted domain, as motivated by the Bounding Self-Labeling Kubelets KEP.This restriction is not mentioned in the Cloud Formation Managed Node Group API documentation.
Which service(s) is this request for?
EKS Managed Node Groups
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Although this problem has been known for a while with, e.g., eksctl and unmanaged node groups (see eksctl-io/eksctl#2363), the only current solution on the table for that is kubernetes/cloud-provider-aws#110 which hasn't advanced in a while, sadly.
Managed Node Groups may want to implement the feature differently, or formalise/document the restrictions as "working as designed", or explicitly decide to build a solution on top of kubernetes/cloud-provider-aws#110 (or another solution) once it exists.
eksctl has a different bug tracking this use-case for Managed Node Groups, eksctl-io/eksctl#4007, and I only just noticed that there was no corresponding feature-request here for restricted-label support in Managed Node Groups.
Are you currently working around this issue?
Not using the restricted labels, e.g., if you don't populate
node-role.kubernetes.io/
, you don't see a role listed in thekubectl get
output's dedicated column for this value.Additional context
This is different from #854 and #733, which was a request to implicitly apply the Managed Node Group's name as the
node-role.kubernetes.io/
-prefixed label. This feature request is for general support of otherwise-restricted label prefixes (including but not limited tonode-role.kubernetes.io
) in theLabels
field of the Managed Node Group API.Attachments
None.
The text was updated successfully, but these errors were encountered: