<p>Recently Kubernetes started preview work on <a href="https://cluster-api.sigs.k8s.io" rel="nofollow noreferrer">https://cluster-api.sigs.k8s.io</a> which is meant to be the standard way to solve the way how High Availability clusters are deployed.</p>

<p>The <code>kubeadm</code> tool has also been updated with features to deploy multiple masters since this question was first asked, which help tremendously. With the exception of deploying cloud-specific configuration, the documentation for <code>kubeadm</code> configuration YAML file brings you quite the way towards having a properly deployed cluster.</p>

<p>docs for <code>kubeadm</code>: <a href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/</a></p>

CC BY-SA 4.0
2019-12-24T19:53:12.480Z
2019-12-24T19:53:12.480Z
Evgeny Zislis
<p>Anyone knows if there is a solution to provision (non-managed) autoscaling Kubernetes clusters in the cloud?</p>

<p>I am looking for a generic solution that will work in any public cloud and in private data centers.</p>

<p>After quite a bit of research, the known available options do not answer the requirement above -</p>

<ul>
<li><p><a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer"><code>kops</code></a> which is AWS specific is using own AMI images.</p></li>
<li><p><a href="https://github.com/kubernetes-incubator/kubespray" rel="nofollow noreferrer"><code>kubespray</code></a> (aka kargo) has no notion of autoscaling, executes Ansible on a specific inventory of hosts.</p></li>
<li><p><a href="https://github.com/kubernetes/kubeadm" rel="nofollow noreferrer"><code>kubeadm</code></a> expects a known list of hosts and does not take care of OS setup like docker, kubelet, etc...</p></li>
<li><p><a href="https://github.com/kubernetes/autoscaler" rel="nofollow noreferrer"><code>kubernetes autoscaler</code></a> controls existing auto scaling groups, does not prepare the images used by those groups.</p></li>
</ul>

<p>Is there some generic solution to make an autoscaling group deploy Kubernetes cluster on itself? Possibly a way to build cloud images (like AMI in AWS) using Packer for this.</p>

<p>Looking for a method that is not specific to one public cloud and allows to use an elastic environment that scales automatically based on prepared images.</p>

CC BY-SA 4.0
2018-11-12T16:32:21.483Z
As far as I know kops allow deployments in AWS or GCE and some efforts are made to allow vsphere deploys also (this last point is far from stable that said), did you hit a roadblock on GCE  or another cloud provider ?
Tensibai
CC BY-SA 4.0
2018-11-12T17:16:25.540Z
I need to have a similar process that can be used with multiple clouds, AWS and AliCloud are first, but also bare-metal deployments like Packet.com are an option. Having a known working process that is not coupled to a specific cloud is what I am looking for. For example, `kops` are using their own custom built AMIs on AWS, this is not really acceptable for our purposes.
Evgeny Zislis
CC BY-SA 4.0
2018-11-12T17:22:46.937Z
Ok, I didn't properly understood this requirements. Maybe looking around [rancher](https://rancher.com/) could be an option to bake your own images from it ?
Tensibai
CC BY-SA 4.0
2018-11-20T20:53:26.443Z
I'm assuming you're aware of the built-in [horizontal pod autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/); can you describe what that doesn't do that you're looking for?
Xiong Chiamiov
CC BY-SA 4.0
2018-11-21T09:47:32.493Z
@XiongChiamiov I am not talking about scaling pods, I am talking about scaling nodes.
Evgeny Zislis
CC BY-SA 4.0
2019-12-24T14:25:09.580Z
Could you indicate whether you solved the issue? Could you update the question?
030
CC BY-SA 4.0
2019-12-24T19:18:11.950Z
@030 eventually solved it with a wrapper around `kubeadm` and a lot of custom orchestration written using script (bash, but could be any other language) that executes it on the various servers of the environment. So with the exception of this (completely new) thing, I know of no other solution as of yet - https://cluster-api.sigs.k8s.io/
Evgeny Zislis
CC BY-SA 4.0
2019-12-24T19:20:42.157Z
@Evgeny thanks for your reply. Could you post this as an answer?
030
CC BY-SA 4.0
2018-12-21T08:02:25.010Z
Maybe elaborating on why you need autoscaling nodes would help. It's pretty atypical to need autoscaling nodes in a private datacentre, as you have already paid ahead of time for your capacity.
user2640621
CC BY-SA 4.0
2018-12-23T14:03:01.283Z
Elastic infrastructure is not *atypical*, adding nodes and having these register themselves once power and network cables are connected without waiting for a "sysadmin" is quite typical. Same goes when a power failure happens, or network problems disconnect some capacity from the master servers.
Evgeny Zislis
<kubernetes><autoscaling>
Kubernetes auto scaling in cloud environment
Evgeny Zislis
# Kubernetes auto scaling in cloud environment

(Asked by: username_0 on 2018-11-12)

Anyone knows if there is a solution to provision (non-managed) autoscaling Kubernetes clusters in the cloud?

I am looking for a generic solution that will work in any public cloud and in private data centers.

After quite a bit of research, the known available options do not answer the requirement above -

* [`kops`](https://github.com/kubernetes/kops) which is AWS specific is using own AMI images.
* [`kubespray`](https://github.com/kubernetes-incubator/kubespray) (aka kargo) has no notion of autoscaling, executes Ansible on a specific inventory of hosts.
* [`kubeadm`](https://github.com/kubernetes/kubeadm) expects a known list of hosts and does not take care of OS setup like docker, kubelet, etc...
* [`kubernetes autoscaler`](https://github.com/kubernetes/autoscaler) controls existing auto scaling groups, does not prepare the images used by those groups.

Is there some generic solution to make an autoscaling group deploy Kubernetes cluster on itself? Possibly a way to build cloud images (like AMI in AWS) using Packer for this.

Looking for a method that is not specific to one public cloud and allows to use an elastic environment that scales automatically based on prepared images.

**Tags:** kubernetes, autoscaling

> **Comments:**
> **username_1**: As far as I know kops allow deployments in AWS or GCE and some efforts are made to allow vsphere deploys also (this last point is far from stable that said), did you hit a roadblock on GCE  or another cloud provider ?  
> **username_0**: I need to have a similar process that can be used with multiple clouds, AWS and AliCloud are first, but also bare-metal deployments like Packet.com are an option. Having a known working process that is not coupled to a specific cloud is what I am looking for. For example, `kops` are using their own custom built AMIs on AWS, this is not really acceptable for our purposes.  
> **username_1**: Ok, I didn't properly understood this requirements. Maybe looking around [rancher](https://rancher.com/) could be an option to bake your own images from it ?  
> **username_2**: I'm assuming you're aware of the built-in [horizontal pod autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/); can you describe what that doesn't do that you're looking for?  
> **username_0**: @XiongChiamiov I am not talking about scaling pods, I am talking about scaling nodes.  
> **username_4**: Maybe elaborating on why you need autoscaling nodes would help. It's pretty atypical to need autoscaling nodes in a private datacentre, as you have already paid ahead of time for your capacity.  
> **username_0**: Elastic infrastructure is not *atypical*, adding nodes and having these register themselves once power and network cables are connected without waiting for a "sysadmin" is quite typical. Same goes when a power failure happens, or network problems disconnect some capacity from the master servers.  
> **username_3**: Could you indicate whether you solved the issue? Could you update the question?  
> **username_0**: @username_3 eventually solved it with a wrapper around `kubeadm` and a lot of custom orchestration written using script (bash, but could be any other language) that executes it on the various servers of the environment. So with the exception of this (completely new) thing, I know of no other solution as of yet - https://cluster-api.sigs.k8s.io/  
> **username_3**: @Evgeny thanks for your reply. Could you post this as an answer?  

---

## 1 answers

### Answer by username_0 on 2019-12-24. Score: 1

Recently Kubernetes started preview work on <https://cluster-api.sigs.k8s.io> which is meant to be the standard way to solve the way how High Availability clusters are deployed.

The `kubeadm` tool has also been updated with features to deploy multiple masters since this question was first asked, which help tremendously. With the exception of deploying cloud-specific configuration, the documentation for `kubeadm` configuration YAML file brings you quite the way towards having a properly deployed cluster.

docs for `kubeadm`: <https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/>


---

