{"id":20359995,"url":"https://github.com/fred78290/kubernetes-cloud-autoscaler","last_synced_at":"2026-05-14T07:33:19.701Z","repository":{"id":253115511,"uuid":"737047703","full_name":"Fred78290/kubernetes-cloud-autoscaler","owner":"Fred78290","description":"autoscaler agent for platform vmware, aws, openstack, cloudstack, multipass","archived":false,"fork":false,"pushed_at":"2024-10-10T17:38:43.000Z","size":29015,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T00:34:57.840Z","etag":null,"topics":["aws","cloudstack","kubernetes-autoscalers","kubernetes-cluster","kubernetes-controller","multipass","openstack","vmware","vmware-fusion","vmware-vsphere","vmware-workstation","vsphere"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fred78290.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-29T16:43:31.000Z","updated_at":"2024-10-07T19:41:28.000Z","dependencies_parsed_at":"2024-08-14T15:36:20.153Z","dependency_job_id":"b89fab75-75d8-42bd-9111-2868a1d5f224","html_url":"https://github.com/Fred78290/kubernetes-cloud-autoscaler","commit_stats":null,"previous_names":["fred78290/kubernetes-cloud-autoscaler"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Fred78290/kubernetes-cloud-autoscaler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fkubernetes-cloud-autoscaler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fkubernetes-cloud-autoscaler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fkubernetes-cloud-autoscaler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fkubernetes-cloud-autoscaler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fred78290","download_url":"https://codeload.github.com/Fred78290/kubernetes-cloud-autoscaler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fkubernetes-cloud-autoscaler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33015296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudstack","kubernetes-autoscalers","kubernetes-cluster","kubernetes-controller","multipass","openstack","vmware","vmware-fusion","vmware-vsphere","vmware-workstation","vsphere"],"created_at":"2024-11-14T23:37:06.047Z","updated_at":"2026-05-14T07:33:19.667Z","avatar_url":"https://github.com/Fred78290.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/Fred78290/kubernetes-cloud-autoscaler/actions/workflows/build.yml/badge.svg)](https://github.com/Fred78290/kubernetes-cloud-autoscaler/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Fred78290_kubernetes-cloud-autoscaler\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=Fred78290_kubernetes-cloud-autoscaler)\n[![Licence](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/Fred78290/kubernetes-cloud-autoscaler/blob/master/LICENSE)\n\n# kubernetes-cloud-autoscaler\n\nKubernetes cloud autoscaler for **vsphere,aws,multipass,openstack,cloudstack,lxd and vmware workstation and vmware fusion** provider including a custom resource controller to create managed node without code\n\n### This project replace [kubernetes-vmware-autoscaler](https://github.com/Fred78290/kubernetes-vmware-autoscaler), [kubernetes-aws-autoscaler](https://github.com/Fred78290/kubernetes-aws-autoscaler), [kubernetes-multipass-autoscaler](https://github.com/Fred78290/kubernetes-multipass-autoscaler), [kubernetes-desktop-autoscaler](https://github.com/Fred78290/kubernetes-desktop-autoscaler).\n\nThe autoscaler allow to use different running plateform with different kubernetes distribution\n\n## Supported plateform with cloud provider\n\n* vSphere\n* AWS\n* VMWare Workstation\n* VMWare Fusion\n* Multipass\n* OpenStack\n* CloudStack\n* LXD\n\n## Supported kube engine with kubernetes distribution\n\n* Kubeadm\n* K3S\n* RKE2\n* Microk8s\n* External\n\n## Supported kubernetes release\n\n* 1.30.0\n  * This version is supported kubernetes v1.30\n* 1.31.0\n  * This version is supported kubernetes v1.31\n\n## How it works\n\nThis tool will drive a cloud provider to deploy VM at the demand. The cluster autoscaler deployment use vanilla cluster-autoscaler or then enhanced version of [cluster-autoscaler](https://github.com/Fred78290/autoscaler).\n\nThis version use grpc to communicate with the cloud provider hosted outside the pod. A docker image is available here [cluster-autoscaler](https://hub.docker.com/r/fred78290/cluster-autoscaler)\n\nSome samples of the cluster-autoscaler deployment are available at `examples/\u003cplateform\u003e/\u003ckube engine\u003e/autoscaler.yaml`. You must fill value between \u003c\u003e\n\nExample of vsphere deployment with k3s: [examples/vsphere/k3s/autoscaler.yaml](https://raw.githubusercontent.com/Fred78290/kubernetes-cloud-autoscaler/main/examples/vsphere/k3s/autoscaler.yaml)\n\n### Before you must create a kubernetes cluster on your plateform\n\nYou can do it from scrash or you can use script from project [autoscaled-masterkube-multipass](https://github.com/Fred78290/autoscaled-masterkube-multipass) to create a kubernetes cluster in single control plane or in HA mode with 3 control planes.\n\n## Commandline arguments\n\n| Parameter | Description |\n| --- | --- |\n| `version` | Display version and exit |\n| `save` | Tell the tool to save state in this file |\n| `config` |The the tool to use config file |\n| `log-format` | The format in which log messages are printed (default: text, options: text, json)|\n| `log-level` | Set the level of logging. (default: info, options: panic, debug, info, warning, error, fatal)|\n| `debug` | Debug mode|\n| `distribution` | Which kubernetes distribution to use: kubeadm, k3s, k3s, external|\n| `use-vanilla-grpc` | Tell we use vanilla autoscaler externalgrpc cloudprovider|\n| `use-controller-manager` | Tell we use vsphere controller manager|\n| `use-external-etcd` | Tell we use an external etcd service (overriden by config file if defined)|\n| `src-etcd-ssl-dir` | Locate the source etcd ssl files (overriden by config file if defined)|\n| `dst-etcd-ssl-dir` | Locate the destination etcd ssl files (overriden by config file if defined)|\n| `kubernetes-pki-srcdir` | Locate the source kubernetes pki files (overriden by config file if defined)|\n| `kubernetes-pki-dstdir` | Locate the destination kubernetes pki files (overriden by config file if defined)|\n| `server` | The Kubernetes API server to connect to (default: auto-detect)|\n| `kubeconfig` | Retrieve target cluster configuration from a Kubernetes configuration file (default: auto-detect)|\n| `request-timeout` | Request timeout when calling Kubernetes APIs. 0s means no timeout|\n| `deletion-timeout` | Deletion timeout when delete node. 0s means no timeout|\n| `node-ready-timeout` | Node ready timeout to wait for a node to be ready. 0s means no timeout|\n| `max-grace-period` | Maximum time evicted pods will be given to terminate gracefully.|\n| `min-cpus` | Limits: minimum cpu (default: 1)|\n| `max-cpus` | Limits: max cpu (default: 24)|\n| `min-memory` | Limits: minimum memory in MB (default: 1G)|\n| `max-memory` | Limits: max memory in MB (default: 24G)|\n| `min-managednode-cpus` | Managed node: minimum cpu (default: 2)|\n| `max-managednode-cpus` | Managed node: max cpu (default: 32)|\n| `min-managednode-memory` | Managed node: minimum memory in MB (default: 2G)|\n| `max-managednode-memory` | Managed node: max memory in MB (default: 24G)|\n| `min-managednode-disksize` | Managed node: minimum disk size in MB (default: 10MB)|\n| `max-managednode-disksize` | Managed node: max disk size in MB (default: 1T)|\n\n## Build\n\nThe build process use make file. The simplest way to build is `make container`\n\n# Supported kube engine\n\n## Use k3s, rke2, microk8s or external as kubernetes distribution method\n\nInstead using **kubeadm** as kubernetes distribution method, it is possible to use **k3s**, **rke2**, **microk8s** or **external**\n\n**external** allow to use custom shell script to join cluster\n\nSamples provided here\n\n* [external](./examples/multipass/external/autoscaler-custom.yaml)\n* [k3s](./examples/multipass/k3s/autoscaler-custom.yaml)\n* [kubeadm](./examples/multipass/kubeadm/autoscaler-custom.yaml)\n* [microk8s](./examples/multipass/kubeadm/autoscaler-custom.yaml)\n* [rke2](./examples/multipass/k3s/autoscaler-custom.yaml)\n\n## Use the vanilla autoscaler with extern gRPC cloud provider\n\nYou can also use the vanilla autoscaler with the [externalgrpc cloud provider](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/externalgrpc)\n\n#### Samples of the cluster-autoscaler deployment with vanilla autoscaler. You must fill value between \u003c\u003e\n\n* [external](./examples/multipass/external/autoscaler.yaml)\n* [k3s](./examples/multipass/k3s/autoscaler.yaml)\n* [kubeadm](./examples/multipass/kubeadm/autoscaler.yaml)\n* [microk8s](./examples/multipass/microk8s/autoscaler.yaml)\n* [rke2](./examples/multipass/k3s/autoscaler.yaml)\n\n## Use external kubernetes distribution\n\nWhen you use a custom method to create your cluster, you must provide a shell script to autoscaler to join the cluster. The script use a yaml config created by autoscaler at the given path.\nEventually you can provide also a script called before node delettion\n\nconfig: /etc/default/kubernetes-cloud-autoscaler-config.yaml\n\n```yaml\nprovider-id: vsphere://42373f8d-b72d-21c0-4299-a667a18c9fce\nmax-pods: 110\nnode-name: vsphere-dev-k3s-woker-01\nserver: 192.168.1.120:9345\ntoken: K1060b887525bbfa7472036caa8a3c36b550fbf05e6f8e3dbdd970739cbd7373537\ndisable-cloud-controller: false\n````\n\nIf you declare to use an external etcd service\n\n```yaml\ndatastore-endpoint: https://1.2.3.4:2379\ndatastore-cafile: /etc/ssl/etcd/ca.pem\ndatastore-certfile: /etc/ssl/etcd/etcd.pem\ndatastore-keyfile: /etc/ssl/etcd/etcd-key.pem\n```\n\nYou can also provide extras config onto this file\n\n```json\n{\n  \"external\": {\n    \"join-command\": \"/usr/local/bin/join-cluster.sh\",\n    \"delete-command\": \"/usr/local/bin/delete-node.sh\",\n    \"config-path\": \"/etc/default/kubernetes-cloud-autoscaler-config.yaml\",\n    \"extra-config\": {\n        \"mydata\": {\n          \"extra\": \"ball\"\n        },\n        \"...\": \"...\"\n    }\n  }\n}\n```\n\nYour script is responsible to set the correct kubelet flags such as max-pods=110, provider-id=vsphere://42373f8d-b72d-21c0-4299-a667a18c9fce, cloud-provider=external, ...\n\n## Annotations requirements\n\nIf you expected to use cloud-autoscaler on already deployed kubernetes cluster, you must add some node annotations to existing node\n\nAlso don't forget to create an image usable by autoscaler to scale up the cluster [create-image.sh](https://raw.githubusercontent.com/Fred78290/autoscaled-masterkube-multipass/master/bin/create-image.sh)\n\n| Annotation | Description | Value |\n| --- | --- | --- |\n| `cluster-autoscaler.kubernetes.io/scale-down-disabled` | Avoid scale down for this node |true|\n| `cluster.autoscaler.nodegroup/name` | Node group name |vsphere-dev-k3s|\n| `cluster.autoscaler.nodegroup/autoprovision` | Tell if the node is provisionned by autoscaler |false|\n| `cluster.autoscaler.nodegroup/instance-id` | The vm UUID |42373f8d-b72d-21c0-4299-a667a18c9fce|\n| `cluster.autoscaler.nodegroup/instance-name` | The vm name |vsphere-dev-k3s-masterkube|\n| `cluster.autoscaler.nodegroup/managed` | Tell if the node is managed by autoscaler not autoscaled |false|\n| `cluster.autoscaler.nodegroup/node-index` | The node index, will be set if missing |0|\n\nSample master node\n\n```text\n    cluster-autoscaler.kubernetes.io/scale-down-disabled: \"true\"\n    cluster.autoscaler.nodegroup/autoprovision: \"false\"\n    cluster.autoscaler.nodegroup/instance-id: 42373f8d-b72d-21c0-4299-a667a18c9fce\n    cluster.autoscaler.nodegroup/instance-name: vsphere-dev-k3s-masterkube\n    cluster.autoscaler.nodegroup/managed: \"false\" \n    cluster.autoscaler.nodegroup/name: vsphere-dev-k3s\n    cluster.autoscaler.nodegroup/node-index: \"0\"\n```\n\nSample first worker node\n\n```text\n    cluster-autoscaler.kubernetes.io/scale-down-disabled: \"true\"\n    cluster.autoscaler.nodegroup/autoprovision: \"false\"\n    cluster.autoscaler.nodegroup/instance-id: 42370879-d4f7-eab0-a1c2-918a97ac6856\n    cluster.autoscaler.nodegroup/instance-name: vsphere-dev-k3s-worker-01\n    cluster.autoscaler.nodegroup/managed: \"false\"\n    cluster.autoscaler.nodegroup/name: vsphere-dev-k3s\n    cluster.autoscaler.nodegroup/node-index: \"1\"\n```\n\nSample autoscaled worker node\n\n```text\n    cluster-autoscaler.kubernetes.io/scale-down-disabled: \"false\"\n    cluster.autoscaler.nodegroup/autoprovision: \"true\"\n    cluster.autoscaler.nodegroup/instance-id: 3d25c629-3f1d-46b3-be9f-b95db2a64859\n    cluster.autoscaler.nodegroup/instance-name: vsphere-dev-k3s-autoscaled-01\n    cluster.autoscaler.nodegroup/managed: \"false\"\n    cluster.autoscaler.nodegroup/name: vsphere-dev-k3s\n    cluster.autoscaler.nodegroup/node-index: \"2\"\n```\n\n## Node labels\n\nThese labels will be added\n\n| Label | Description | Value |\n| --- | --- | --- |\n|`node-role.kubernetes.io/control-plane`|Tell if the node is control-plane |true|\n|`node-role.kubernetes.io/master`|Tell if the node is master |true|\n|`node-role.kubernetes.io/worker`|Tell if the node is worker |true|\n\n## Cloud controller provider compliant\n\nautoscaler will set correctly the node provider id when you use platform cloud controller.\n\n## CRD controller\n\nThis release include a CRD controller allowing to create kubernetes node without use of cli or code. Just by apply a configuration file, you have the ability to create nodes on the fly.\n\nAs example you can take a look on [artifacts/examples](https://github.com/Fred78290/kubernetes-cloud-autoscaler/tree/main/artifacts/examples) on execute the following command to create a new node\n\n|File|Description|\n| --- | --- |\n|`managed-addr.yaml`|Create a managed node with a fixed IP address|\n|`managed-control-plane.yaml`|Create a control-plane node with a fixed IP address |\n|`managed-dhcp.yaml`|Create a managed node with a DHCP address|\n|`managed-nodes.yaml`|Create two managed nodes with a fixed IP address|\n\n#### Create managed node on aws with k3s engine\n\n```bash\nkubectl apply -f artifacts/examples/aws/k3s/managed-addr.yaml\nkubectl apply -f artifacts/examples/aws/k3s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/aws/k3s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/aws/k3s/managed-nodes.yaml\n````\n\n#### Create managed node on aws with kubeadm engine\n\n```bash\nkubectl apply -f artifacts/examples/aws/kubeadm/managed-addr.yaml\nkubectl apply -f artifacts/examples/aws/kubeadm/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/aws/kubeadm/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/aws/kubeadm/managed-nodes.yaml\n```\n\n#### Create managed node on aws with microk8s engine\n\n```bash\nkubectl apply -f artifacts/examples/aws/microk8s/managed-addr.yaml\nkubectl apply -f artifacts/examples/aws/microk8s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/aws/microk8s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/aws/microk8s/managed-nodes.yaml\n```\n\n#### Create managed node on aws with rke2 engine\n\n```bash\nkubectl apply -f artifacts/examples/aws/rke2/managed-addr.yaml\nkubectl apply -f artifacts/examples/aws/rke2/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/aws/rke2/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/aws/rke2/managed-nodes.yaml\n```\n\n#### Create managed node on cloudstack with k3s engine\n\n```bash\nkubectl apply -f artifacts/examples/cloudstack/k3s/managed-addr.yaml\nkubectl apply -f artifacts/examples/cloudstack/k3s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/cloudstack/k3s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/cloudstack/k3s/managed-nodes.yaml\n```\n\n#### Create managed node on cloudstack with kubeadm engine\n\n```bash\nkubectl apply -f artifacts/examples/cloudstack/kubeadm/managed-addr.yaml\nkubectl apply -f artifacts/examples/cloudstack/kubeadm/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/cloudstack/kubeadm/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/cloudstack/kubeadm/managed-nodes.yaml\n```\n\n#### Create managed node on cloudstack with microks8 engine\n\n```bash\nkubectl apply -f artifacts/examples/cloudstack/microk8s/managed-addr.yaml\nkubectl apply -f artifacts/examples/cloudstack/microk8s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/cloudstack/microk8s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/cloudstack/microk8s/managed-nodes.yaml\n```\n\n#### Create managed node on cloudstack with rke2 engine\n\n```bash\nkubectl apply -f artifacts/examples/cloudstack/rke2/managed-addr.yaml\nkubectl apply -f artifacts/examples/cloudstack/rke2/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/cloudstack/rke2/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/cloudstack/rke2/managed-nodes.yaml\n```\n\n#### Create managed node on vmware desktop with k3s engine\n\n```bash\nkubectl apply -f artifacts/examples/desktop/k3s/managed-addr.yaml\nkubectl apply -f artifacts/examples/desktop/k3s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/desktop/k3s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/desktop/k3s/managed-nodes.yaml\n```\n\n#### Create managed node on vmware desktop with kubeadm engine\n\n```bash\nkubectl apply -f artifacts/examples/desktop/kubeadm/managed-addr.yaml\nkubectl apply -f artifacts/examples/desktop/kubeadm/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/desktop/kubeadm/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/desktop/kubeadm/managed-nodes.yaml\n```\n\n#### Create managed node on vmware desktop with microk8s engine\n\n```bash\nkubectl apply -f artifacts/examples/desktop/microk8s/managed-addr.yaml\nkubectl apply -f artifacts/examples/desktop/microk8s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/desktop/microk8s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/desktop/microk8s/managed-nodes.yaml\n```\n\n#### Create managed node on vmware desktop with rke2 engine\n\n```bash\nkubectl apply -f artifacts/examples/desktop/rke2/managed-addr.yaml\nkubectl apply -f artifacts/examples/desktop/rke2/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/desktop/rke2/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/desktop/rke2/managed-nodes.yaml\n```\n\n#### Create managed node on multipass with k3s engine\n\n```bash\nkubectl apply -f artifacts/examples/multipass/k3s/managed-addr.yaml\nkubectl apply -f artifacts/examples/multipass/k3s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/multipass/k3s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/multipass/k3s/managed-nodes.yaml\n```\n\n#### Create managed node on multipass with kubeadm engine\n\n```bash\nkubectl apply -f artifacts/examples/multipass/kubeadm/managed-addr.yaml\nkubectl apply -f artifacts/examples/multipass/kubeadm/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/multipass/kubeadm/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/multipass/kubeadm/managed-nodes.yaml\n```\n\n#### Create managed node on multipass with microk8s engine\n\n```bash\nkubectl apply -f artifacts/examples/multipass/microk8s/managed-addr.yaml\nkubectl apply -f artifacts/examples/multipass/microk8s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/multipass/microk8s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/multipass/microk8s/managed-nodes.yaml\n```\n\n#### Create managed node on multipass with rke2 engine\n\n```bash\nkubectl apply -f artifacts/examples/multipass/rke2/managed-addr.yaml\nkubectl apply -f artifacts/examples/multipass/rke2/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/multipass/rke2/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/multipass/rke2/managed-nodes.yaml\n```\n\n#### Create managed node on openstack with k3s engine\n\n```bash\nkubectl apply -f artifacts/examples/openstack/k3s/managed-addr.yaml\nkubectl apply -f artifacts/examples/openstack/k3s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/openstack/k3s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/openstack/k3s/managed-nodes.yaml\n```\n\n#### Create managed node on openstack with kubeadm engine\n\n```bash\nkubectl apply -f artifacts/examples/openstack/kubeadm/managed-addr.yaml\nkubectl apply -f artifacts/examples/openstack/kubeadm/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/openstack/kubeadm/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/openstack/kubeadm/managed-nodes.yaml\n```\n\n#### Create managed node on openstack with microk8s engine\n\n```bash\nkubectl apply -f artifacts/examples/openstack/microk8s/managed-addr.yaml\nkubectl apply -f artifacts/examples/openstack/microk8s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/openstack/microk8s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/openstack/microk8s/managed-nodes.yaml\n```\n\n#### Create managed node on openstack with rke2 engine\n\n```bash\nkubectl apply -f artifacts/examples/openstack/rke2/managed-addr.yaml\nkubectl apply -f artifacts/examples/openstack/rke2/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/openstack/rke2/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/openstack/rke2/managed-nodes.yaml\n```\n\n#### Create managed node on vsphere with k3s engine\n\n```bash\nkubectl apply -f artifacts/examples/vsphere/k3s/managed-addr.yaml\nkubectl apply -f artifacts/examples/vsphere/k3s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/vsphere/k3s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/vsphere/k3s/managed-nodes.yaml\n```\n\n#### Create managed node on vsphere with kubeadm engine\n\n```bash\nkubectl apply -f artifacts/examples/vsphere/kubeadm/managed-addr.yaml\nkubectl apply -f artifacts/examples/vsphere/kubeadm/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/vsphere/kubeadm/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/vsphere/kubeadm/managed-nodes.yaml\n```\n\n#### Create managed node on vsphere with microk8s engine\n\n```bash\nkubectl apply -f artifacts/examples/vsphere/microk8s/managed-addr.yaml\nkubectl apply -f artifacts/examples/vsphere/microk8s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/vsphere/microk8s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/vsphere/microk8s/managed-nodes.yaml\n```\n\n#### Create managed node on vsphere with rke2 engine\n\n```bash\nkubectl apply -f artifacts/examples/vsphere/rke2/managed-addr.yaml\nkubectl apply -f artifacts/examples/vsphere/rke2/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/vsphere/rke2/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/vsphere/rke2/managed-nodes.yaml\n```\n\n#### Create managed node on lxd with k3s engine\n\n```bash\nkubectl apply -f artifacts/examples/lxd/k3s/managed-addr.yaml\nkubectl apply -f artifacts/examples/lxd/k3s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/lxd/k3s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/lxd/k3s/managed-nodes.yaml\n```\n\n#### Create managed node on lxd with kubeadm engine\n\n```bash\nkubectl apply -f artifacts/examples/lxd/kubeadm/managed-addr.yaml\nkubectl apply -f artifacts/examples/lxd/kubeadm/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/lxd/kubeadm/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/lxd/kubeadm/managed-nodes.yaml\n```\n\n#### Create managed node on lxd with microk8s engine\n\n```bash\nkubectl apply -f artifacts/examples/lxd/microk8s/managed-addr.yaml\nkubectl apply -f artifacts/examples/lxd/microk8s/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/lxd/microk8s/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/lxd/microk8s/managed-nodes.yaml\n```\n\n#### Create managed node on lxd with rke2 engine\n\n```bash\nkubectl apply -f artifacts/examples/lxd/rke2/managed-addr.yaml\nkubectl apply -f artifacts/examples/lxd/rke2/managed-control-plane.yaml\nkubectl apply -f artifacts/examples/lxd/rke2/managed-dhcp.yaml\nkubectl apply -f artifacts/examples/lxd/rke2/managed-nodes.yaml\n```\n\nIf you want delete the node just delete the CRD with the call\n\n```bash\nkubectl delete -f artifacts/examples/vsphere/rke2/managed-dhcp.yaml\n```\n\nYou have the ability also to create a control plane as instead a worker\n\n```bash\nkubectl apply -f artifacts/examples/vsphere/rke2/managed-control-plane.yaml\n```\n\nThe resource is cluster scope so you don't need a namespace. The name of the resource is not the name of the managed node.\n\nThe minimal resource declaration\n\n```yaml\napiVersion: \"nodemanager.aldunelabs.com/v1alpha2\"\nkind: \"ManagedNode\"\nmetadata:\n  name: \"vsphere-dev-k3s-managed-01\"\nspec:\n  nodegroup: vsphere-dev-k3s\n  instanceType: small\n  diskSizeInMb: 10240\n  diskType: gp3\n```\n\nThe full qualified resource including networks declaration to override the default controller network management and adding some node labels \u0026 annotations. If you specify the managed node as controller, you can also allows the controlplane to support deployment as a worker node\n\n```yaml\napiVersion: \"nodemanager.aldunelabs.com/v1alpha2\"\nkind: \"ManagedNode\"\nmetadata:\n  name: \"vsphere-dev-k3s-managed-01\"\nspec:\n  nodegroup: vsphere-dev-k3s\n  controlPlane: false\n  allowDeployment: true\n  instanceType: small\n  diskSizeInMB: 10240\n  diskType: gp3\n  labels:\n  - demo-label.acme.com=demo\n  - sample-label.acme.com=sample\n  annotations:\n  - demo-annotation.acme.com=demo\n  - sample-annotation.acme.com=sample\n  network:\n    vmware:\n      -\n        network: \"VM Network\"\n        address: 10.0.0.85\n        netmask: 255.255.255.0\n        use-dhcp-routes: false\n        routes:\n          - to: default\n            via: 10.0.0.1\n            metric: 100\n          - to: x.x.0.0/16\n            via: 10.0.0.1\n            metric: 100\n          - to: y.y.y.y/8\n            via: 10.0.0.1\n            metric: 500\n      -\n        network: \"VLAN20\"\n        address: 192.168.2.80\n        netmask: 255.255.255.0\n        use-dhcp-routes: false\n```\n\nAs example of use generated by autoscaled-masterkube-multipass scripts\n\n```json\n{\n    \"use-external-etcd\": false,\n    \"src-etcd-ssl-dir\": \"/etc/etcd/ssl\",\n    \"dst-etcd-ssl-dir\": \"/etc/kubernetes/pki/etcd\",\n    \"distribution\": \"k3s\",\n    \"plateform\": \"vsphere\",\n    \"kubernetes-pki-srcdir\": \"/etc/kubernetes/pki\",\n    \"kubernetes-pki-dstdir\": \"/etc/kubernetes/pki\",\n    \"image-credential-provider-bin-dir\": \"/var/lib/rancher/credentialprovider/bin\",\n    \"image-credential-provider-config\": \"/var/lib/rancher/credentialprovider/config.yaml\",\n    \"listen\": \"unix:/var/run/cluster-autoscaler/autoscaler.sock\",\n    \"secret\": \"vsphere\",\n    \"minNode\": 0,\n    \"maxNode\": 9,\n    \"maxPods\": 110,\n    \"maxNode-per-cycle\": 2,\n    \"nodegroup\": \"vsphere-dev-k3s\",\n    \"node-name-prefix\": \"autoscaled\",\n    \"managed-name-prefix\": \"managed\",\n    \"controlplane-name-prefix\": \"master\",\n    \"nodePrice\": 0,\n    \"podPrice\": 0,\n    \"use-cloudinit-config\": false,\n    \"cloudinit-file-owner\": \"root:adm\",\n    \"cloudinit-file-mode\": 420,\n    \"optionals\": {\n        \"pricing\": false,\n        \"getAvailableMachineTypes\": false,\n        \"newNodeGroup\": false,\n        \"templateNodeInfo\": false,\n        \"createNodeGroup\": false,\n        \"deleteNodeGroup\": false\n    },\n    \"k3s\": {\n        \"address\": \"192.168.2.80:6443\",\n        \"token\": \"...\",\n        \"ca\": \"sha256:...\",\n        \"extras-args\": [\n            \"--ignore-preflight-errors=All\"\n        ],\n        \"datastore-endpoint\": \"\",\n        \"extras-commands\": []\n    },\n    \"default-machine\": \"medium\",\n    \"cloud-init\": {\n        \"package_update\": false,\n        \"package_upgrade\": false,\n        \"growpart\": {\n            \"ignore_growroot_disabled\": false,\n            \"mode\": \"auto\",\n            \"devices\": [\n                \"/\"\n            ]\n        },\n        \"runcmd\": [\n            \"echo '192.168.2.80 vsphere-dev-k3s-masterkube vsphere-dev-k3s-masterkube.acme.com' \u003e\u003e /etc/hosts\"\n        ]\n    },\n    \"ssh-infos\": {\n        \"wait-ssh-ready-seconds\": 180,\n        \"user\": \"kubernetes\",\n        \"ssh-private-key\": \"/etc/ssh/id_rsa\"\n    },\n    \"autoscaling-options\": {\n        \"scaleDownUtilizationThreshold\": 0.5,\n        \"scaleDownGpuUtilizationThreshold\": 0.5,\n        \"scaleDownUnneededTime\": \"1m\",\n        \"scaleDownUnreadyTime\": \"1m\",\n        \"maxNodeProvisionTime\": \"15m\",\n        \"zeroOrMaxNodeScaling\": false,\n        \"ignoreDaemonSetsUtilization\": true\n    },\n    \"credential-provider-config\": {\n        \"apiVersion\": \"kubelet.config.k8s.io/v1\",\n        \"kind\": \"CredentialProviderConfig\",\n        \"providers\": [\n            {\n                \"name\": \"ecr-credential-provider\",\n                \"matchImages\": [\n                    \"*.dkr.ecr.*.amazonaws.com\",\n                    \"*.dkr.ecr.*.amazonaws.cn\",\n                    \"*.dkr.ecr-fips.*.amazonaws.com\",\n                    \"*.dkr.ecr.us-iso-east-1.c2s.ic.gov\",\n                    \"*.dkr.ecr.us-isob-east-1.sc2s.sgov.gov\"\n                ],\n                \"defaultCacheDuration\": \"12h\",\n                \"apiVersion\": \"credentialprovider.kubelet.k8s.io/v1\",\n                \"args\": [\n                    \"get-credentials\"\n                ],\n                \"env\": [\n                    {\n                        \"name\": \"AWS_ACCESS_KEY_ID\",\n                        \"value\": \"....\"\n                    },\n                    {\n                        \"name\": \"AWS_SECRET_ACCESS_KEY\",\n                        \"value\": \"....\"\n                    }\n                ]\n            }\n        ]\n    }\n}\n```\n\n```json\n{\n    \"url\": \"https://administrator@vsphere.acme.com:mypassword@vsphere.acme.com/sdk\",\n    \"uid\": \"administrator@vsphere.acme.com\",\n    \"password\": \"mypassword\",\n    \"insecure\": true,\n    \"dc\": \"DC01\",\n    \"datastore\": \"datastore\",\n    \"resource-pool\": \"ACME/Resources/FR\",\n    \"vmFolder\": \"HOME\",\n    \"timeout\": 300,\n    \"template-name\": \"jammy-kubernetes-k3s-v1.29.1+k3s2-amd64\",\n    \"template\": false,\n    \"linked\": false,\n    \"allow-upgrade\": false,\n    \"customization\": \"\",\n    \"region\": \"home\",\n    \"zone\": \"office\",\n    \"network\": {\n        \"domain\": \"acme.com\",\n        \"dns\": {\n            \"search\": [\n                \"acme.com\"\n            ],\n            \"nameserver\": [\n                \"10.0.0.1\"\n            ]\n        },\n        \"interfaces\": [\n            {\n                \"enabled\": true,\n                \"primary\": true,\n                \"exists\": true,\n                \"network\": \"VLAN20\",\n                \"adapter\": \"vmxnet3\",\n                \"mac-address\": \"generate\",\n                \"nic\": \"eth0\",\n                \"dhcp\": true,\n                \"use-dhcp-routes\": false,\n                \"address\": \"192.168.2.83\",\n                \"netmask\": \"255.255.255.0\",\n                \"routes\": [\n                    {\n                        \"to\": \"default\",\n                        \"via\": \"192.168.2.254\",\n                        \"metric\": 100\n                    }\n                ]\n            },\n            {\n                \"enabled\": true,\n                \"primary\": false,\n                \"exists\": false,\n                \"network\": \"VM Network\",\n                \"adapter\": \"vmxnet3\",\n                \"mac-address\": \"generate\",\n                \"nic\": \"eth1\",\n                \"dhcp\": true,\n                \"use-dhcp-routes\": true,\n                \"routes\": [\n                    {\n                        \"to\": \"172.30.0.0/16\",\n                        \"via\": \"10.0.0.1\",\n                        \"metric\": 500\n                    }\n                ]\n            }\n        ]\n    }\n}\n````\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffred78290%2Fkubernetes-cloud-autoscaler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffred78290%2Fkubernetes-cloud-autoscaler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffred78290%2Fkubernetes-cloud-autoscaler/lists"}