-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Automatic Instance Group labels for Node Affinity scheduling #311
Comments
I thought there was an issue for this already but I can't find it. I haven't tried it yet but I was going to see if the labelgun project helped by labeling nodes with AWS tags. My hope is it would label with the ASG so I could use node affinity to select them. Might be a temporary workaround until kops label nodes directly. |
Fix kubernetes#441 Fix kubernetes#241 Issue kubernetes#311
I just added the docs on how to do labels (both AWS tags and k8s node labels) at the instance group level. You do have to specify them for each instance group (i.e. there is no "cluster level" labeling yet). Does this solve the issue? (and if not, what is missing?) |
Can the docs be a bit more verbose? where does the nodeLabels value go? top-level? inside the metadata? the spec? lower still? |
@oO-Zam if you are able to contribute please let us know! |
@oO-Zam With the new yaml docs, and the labels docs, I am going to close. Please re-open if you need to. |
Contains the workaround for 1-year certificate expiry. Full changes * Release notes for 3.0.20200307 [kubernetes#303](kopeio/etcd-manager#303) * Add support for etcd 3.3.17 [kubernetes#304](kopeio/etcd-manager#304) * Adding client usage extension for server cert (kubernetes#305) [kubernetes#306](kopeio/etcd-manager#306) * Add a check to renew certificates on startup if they expire in 60 days or less [kubernetes#309](kopeio/etcd-manager#309) * Try github actions [kubernetes#310](kopeio/etcd-manager#310) * Upgrade bazel to 2.2.0 [kubernetes#311](kopeio/etcd-manager#311) * Update to go 1.13.10 [kubernetes#314](kopeio/etcd-manager#314) * Bazel: update dependency [kubernetes#316](kopeio/etcd-manager#316) * e2e tests should wait for cluster readiness [kubernetes#318](kopeio/etcd-manager#318) * Remove old bazel versions from travis [kubernetes#317](kopeio/etcd-manager#317) * Always renew certificates [kubernetes#313](kopeio/etcd-manager#313)
Contains the workaround for 1-year certificate expiry. Full changes * Release notes for 3.0.20200307 [kubernetes#303](kopeio/etcd-manager#303) * Add support for etcd 3.3.17 [kubernetes#304](kopeio/etcd-manager#304) * Adding client usage extension for server cert (kubernetes#305) [kubernetes#306](kopeio/etcd-manager#306) * Add a check to renew certificates on startup if they expire in 60 days or less [kubernetes#309](kopeio/etcd-manager#309) * Try github actions [kubernetes#310](kopeio/etcd-manager#310) * Upgrade bazel to 2.2.0 [kubernetes#311](kopeio/etcd-manager#311) * Update to go 1.13.10 [kubernetes#314](kopeio/etcd-manager#314) * Bazel: update dependency [kubernetes#316](kopeio/etcd-manager#316) * e2e tests should wait for cluster readiness [kubernetes#318](kopeio/etcd-manager#318) * Remove old bazel versions from travis [kubernetes#317](kopeio/etcd-manager#317) * Always renew certificates [kubernetes#313](kopeio/etcd-manager#313)
Contains the workaround for 1-year certificate expiry. Full changes * Release notes for 3.0.20200307 [kubernetes#303](kopeio/etcd-manager#303) * Add support for etcd 3.3.17 [kubernetes#304](kopeio/etcd-manager#304) * Adding client usage extension for server cert (kubernetes#305) [kubernetes#306](kopeio/etcd-manager#306) * Add a check to renew certificates on startup if they expire in 60 days or less [kubernetes#309](kopeio/etcd-manager#309) * Try github actions [kubernetes#310](kopeio/etcd-manager#310) * Upgrade bazel to 2.2.0 [kubernetes#311](kopeio/etcd-manager#311) * Update to go 1.13.10 [kubernetes#314](kopeio/etcd-manager#314) * Bazel: update dependency [kubernetes#316](kopeio/etcd-manager#316) * e2e tests should wait for cluster readiness [kubernetes#318](kopeio/etcd-manager#318) * Remove old bazel versions from travis [kubernetes#317](kopeio/etcd-manager#317) * Always renew certificates [kubernetes#313](kopeio/etcd-manager#313)
Contains the workaround for 1-year certificate expiry. Full changes * Release notes for 3.0.20200307 [kubernetes#303](kopeio/etcd-manager#303) * Add support for etcd 3.3.17 [kubernetes#304](kopeio/etcd-manager#304) * Adding client usage extension for server cert (kubernetes#305) [kubernetes#306](kopeio/etcd-manager#306) * Add a check to renew certificates on startup if they expire in 60 days or less [kubernetes#309](kopeio/etcd-manager#309) * Try github actions [kubernetes#310](kopeio/etcd-manager#310) * Upgrade bazel to 2.2.0 [kubernetes#311](kopeio/etcd-manager#311) * Update to go 1.13.10 [kubernetes#314](kopeio/etcd-manager#314) * Bazel: update dependency [kubernetes#316](kopeio/etcd-manager#316) * e2e tests should wait for cluster readiness [kubernetes#318](kopeio/etcd-manager#318) * Remove old bazel versions from travis [kubernetes#317](kopeio/etcd-manager#317) * Always renew certificates [kubernetes#313](kopeio/etcd-manager#313)
Contains the workaround for 1-year certificate expiry. Full changes * Release notes for 3.0.20200307 [kubernetes#303](kopeio/etcd-manager#303) * Add support for etcd 3.3.17 [kubernetes#304](kopeio/etcd-manager#304) * Adding client usage extension for server cert (kubernetes#305) [kubernetes#306](kopeio/etcd-manager#306) * Add a check to renew certificates on startup if they expire in 60 days or less [kubernetes#309](kopeio/etcd-manager#309) * Try github actions [kubernetes#310](kopeio/etcd-manager#310) * Upgrade bazel to 2.2.0 [kubernetes#311](kopeio/etcd-manager#311) * Update to go 1.13.10 [kubernetes#314](kopeio/etcd-manager#314) * Bazel: update dependency [kubernetes#316](kopeio/etcd-manager#316) * e2e tests should wait for cluster readiness [kubernetes#318](kopeio/etcd-manager#318) * Remove old bazel versions from travis [kubernetes#317](kopeio/etcd-manager#317) * Always renew certificates [kubernetes#313](kopeio/etcd-manager#313)
Contains the workaround for 1-year certificate expiry. Full changes * Release notes for 3.0.20200307 [kubernetes#303](kopeio/etcd-manager#303) * Add support for etcd 3.3.17 [kubernetes#304](kopeio/etcd-manager#304) * Adding client usage extension for server cert (kubernetes#305) [kubernetes#306](kopeio/etcd-manager#306) * Add a check to renew certificates on startup if they expire in 60 days or less [kubernetes#309](kopeio/etcd-manager#309) * Try github actions [kubernetes#310](kopeio/etcd-manager#310) * Upgrade bazel to 2.2.0 [kubernetes#311](kopeio/etcd-manager#311) * Update to go 1.13.10 [kubernetes#314](kopeio/etcd-manager#314) * Bazel: update dependency [kubernetes#316](kopeio/etcd-manager#316) * e2e tests should wait for cluster readiness [kubernetes#318](kopeio/etcd-manager#318) * Remove old bazel versions from travis [kubernetes#317](kopeio/etcd-manager#317) * Always renew certificates [kubernetes#313](kopeio/etcd-manager#313)
Contains the workaround for 1-year certificate expiry. Full changes * Release notes for 3.0.20200307 [kubernetes#303](kopeio/etcd-manager#303) * Add support for etcd 3.3.17 [kubernetes#304](kopeio/etcd-manager#304) * Adding client usage extension for server cert (kubernetes#305) [kubernetes#306](kopeio/etcd-manager#306) * Add a check to renew certificates on startup if they expire in 60 days or less [kubernetes#309](kopeio/etcd-manager#309) * Try github actions [kubernetes#310](kopeio/etcd-manager#310) * Upgrade bazel to 2.2.0 [kubernetes#311](kopeio/etcd-manager#311) * Update to go 1.13.10 [kubernetes#314](kopeio/etcd-manager#314) * Bazel: update dependency [kubernetes#316](kopeio/etcd-manager#316) * e2e tests should wait for cluster readiness [kubernetes#318](kopeio/etcd-manager#318) * Remove old bazel versions from travis [kubernetes#317](kopeio/etcd-manager#317) * Always renew certificates [kubernetes#313](kopeio/etcd-manager#313)
I love the concept of InstanceGroups because it would allow us to have certain unimportant, stateless, idempotent parts of our infrastructure running on spot instances. However, right now there's no real way for us to only schedule parts of our infrastructure in a specific instance group. For instance I don't want my database pods to end up on the t2.micro or SpotInstance instance groups.
Kubernetes already offers the required constructs by using Node Affinity. However this still requires us to manually label the nodes that Kops has created using
kubectl label node
. Even though this is possible (but not desirable) in the case where servers are expected to run for a while, it's less than ideal when trying to use SpotInstances. A quick workaround used a simple bash script but it still requires us to maintain a list of nodes and re-run the script every time something changes.Ideally Kops/Kubernetes would automatically tag nodes with a certain instance-group tag so that it becomes easier to schedule pods to a specific group.
My initial idea was to create a DeamonSet in kubernetes that reads certain node information and assigns it as a label and that Kops makes sure that nodes created in the AutoScaling group get assigned the appropriate data for the DeamonSet to read. But would love some feedback.
The text was updated successfully, but these errors were encountered: