Skip to content
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

Closed
RXminuS opened this issue Aug 15, 2016 · 5 comments
Closed

Automatic Instance Group labels for Node Affinity scheduling #311

RXminuS opened this issue Aug 15, 2016 · 5 comments

Comments

@RXminuS
Copy link

RXminuS commented Aug 15, 2016

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.

@jkemp101test
Copy link

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.

@justinsb justinsb modified the milestone: 1.3.1 Aug 21, 2016
justinsb added a commit to justinsb/kops that referenced this issue Sep 29, 2016
@justinsb
Copy link
Member

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?)

@oO-Zam
Copy link

oO-Zam commented Oct 5, 2016

Can the docs be a bit more verbose? where does the nodeLabels value go? top-level? inside the metadata? the spec? lower still?

@chrislovecnm
Copy link
Contributor

@oO-Zam if you are able to contribute please let us know!

@justinsb justinsb modified the milestones: 1.5.0, 1.5 Dec 28, 2016
@chrislovecnm
Copy link
Contributor

@oO-Zam With the new yaml docs, and the labels docs, I am going to close. Please re-open if you need to.

justinsb added a commit to justinsb/kops that referenced this issue Apr 28, 2020
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)
hakman pushed a commit to hakman/kops that referenced this issue May 2, 2020
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)
hakman pushed a commit to hakman/kops that referenced this issue May 2, 2020
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)
hakman pushed a commit to hakman/kops that referenced this issue May 2, 2020
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)
oded7hoffman pushed a commit to spotinst/kubernetes-kops that referenced this issue Jan 23, 2023
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)
oded7hoffman pushed a commit to spotinst/kubernetes-kops that referenced this issue Jan 23, 2023
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)
oded7hoffman pushed a commit to spotinst/kubernetes-kops that referenced this issue Jan 23, 2023
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants