Kops: node-count 0 sets node count = 2

Created on 28 Jul 2017  Â·  17Comments  Â·  Source: kubernetes/kops

When creating a cluster with kops, if i pass flag kops create cluster --node-count=0 ...
it creates the IG with node count = 2

node count 0 is needed for a single node clusters which are very helpful for experimentation and testing.

lifecyclrotten

Most helpful comment

@fejta The man was asking a simple priority question, of which you responded to exactly three words.

If you want PRs, or indeed any developer engagement, perhaps don't be so rude.

All 17 comments

Because of the taints on the master it does not allow for the scheduling of pods, we do not have the option for a signal k8s instance. If cost is a concern use spot instances. .02 cents an hour for a m3.large

My point is that, if I create a script, I can always issue kubectl uncordon to schedule pods on masters.
but if kops does not recognize node-count, I have to manually go into IG and make the count 0.
There should be at least one, non interactive mode to start 1 node cluster.

also, I have tried it

  • kops create
  • edit config to change node ig count = 0 (this is the only manual step that I wish to automate)
  • kops create ... --yes
  • kubectl uncordon

the cluster works very well. Is there a reason node count 0 is blocked?

Have u tried creating the cluster with yaml manifest instead of create
cluster command?
If u can manually edit the IG then i would assume you can create your
clusters from yaml templates.

To create your first yaml template do kops get NAME -o=yaml

Regards!

El 28 jul. 2017 4:20 a. m., "Vinay" notifications@github.com escribió:

My point is that, if I create a script, I can always issue kubectl cordon
to schedule pods on masters.
but if kops does not recognize node-count, I have to manually go into IG
and make the count 0.
There should be at least one, non interactive mode to start 1 node cluster.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/kops/issues/3073#issuecomment-318538097,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYJbpXs2P6S9dmFTNvWlJ2YYTUjqTp5Jks5sSUVagaJpZM4Ol_Q_
.

Thanks eedugon. I have not tried 0 node cluster using yaml files but I will try, it could possibly work.

Though, it is much more difficult to automate creation of yaml files for cluster than it is to do kops create, but at least I have a path to automation.

I will still encourage to allow it on command line (why not afterall?)

The reason that not all options is available on command line is since the amount of option would be to many. Those option are available to you but you need to edit or create from a file

We are not talking about a new option, we are talking about existing option working in an non-intuitive and undocumented way and limiting automation.
I talked to at least one more person on slack who also ran into same issue.

That's right, you want the nodes size (which is supported on create cluster
command) to allow a value of zero.

Regarding yaml files I really recommend you to try, because getting your
yaml is extremely easy and then you can really tweak it in the way you
want, for example:

RootVolumeSize: that's not supported with basic commands and you might want
bigger or smaller volumes.

Network cidrs for public topology: in my case i like having multiple
clusters on the same VPC and I prefer using /21 subnets than /19... In the
beginning I always raised the create command, then edit command and
manually updating the default subnets to my needs. But when I realized
about the yaml support it helped me a lot, and you can automate in the same
way than the kops create command, because to process the yaml you have to
raise a kops command also.

Anyway I don't know if size 0 will work with the yaml, I haven't tested, I
always set manually to 0 in AWS scaling groups... So definitely I will give
it a try too.

Regards!

I have recently tested with setting the node count to zero in a YAML manifest. It does work, however it imposes several design decisions (such as managing a YAML manifest through version changes) that not all users will want. See https://github.com/kubernetes/kops/issues/4145 for my logs.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@fejta Can we reopen this?

Even if the consensus is that setting to 0 should not be allowed as some things don't work out of the box, then the command should abort with an error and a link to documentation about how to manually fiddle with the YAML instead of just silently changing it to 2. (But I think it should accept the 0 and just output a warning about having to uncordon etc).

Can we

Yes, the bot leaves instructions on ways to respond. I am unfamiliar with the details of this particular issue.

What has changed to warrant reopening an issue no one will work on?

should

Is this an offer to code up a PR that implements the desired behavior?

When issues sit around with no one stepping up to fix them, the bot flags this problem. After many months without progress/activity the bot automatically closes the issue (regardless of abstract merit it would have if someone were to willing to address it).

@fejta The man was asking a simple priority question, of which you responded to exactly three words.

If you want PRs, or indeed any developer engagement, perhaps don't be so rude.

Hi @vinayagg,
When I uncordon the only node I have, I get node/ip-xxx-xx-xx-xx.eu-west-1.compute.internal already uncordoned
However when I want to schedule a pod, it fails to be scheduled.
I get:

  Type     Reason            Age                    From               Message
  ----     ------            ----                   ----               -------
  Warning  FailedScheduling  8m40s (x3 over 8m47s)  default-scheduler  0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate.

This is kops Version 1.11.0 (git-2c2042465) on AWS. Did you experience similar issue?

EDIT:

Right, so by running this I've untainted my node:
kubectl taint nodes --all node-role.kubernetes.io/master-

The command to check if there are any tainted nodes is:
kubectl describe nodes | grep -e 'Taint\|Hostname' or kubectl get nodes -o json | jq .items[].spec.taints

Even though I've managed to run the one node (master) cluster, but the dynamic EBS provisioning doesn't work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

owenmorgan picture owenmorgan  Â·  3Comments

joshbranham picture joshbranham  Â·  3Comments

argusua picture argusua  Â·  5Comments

justinsb picture justinsb  Â·  4Comments

thejsj picture thejsj  Â·  4Comments