{"id":20359989,"url":"https://github.com/fred78290/autoscaled-masterkube-multipass","last_synced_at":"2026-02-06T04:03:23.623Z","repository":{"id":253127965,"uuid":"740119044","full_name":"Fred78290/autoscaled-masterkube-multipass","owner":"Fred78290","description":"Swiss knife to create a kubernetes cluster faster and easier on plateform aws, vmware, openstack, cloudstack, multipass, lxd with kube engine k3,rke2,kubeadm, microk8s","archived":false,"fork":false,"pushed_at":"2024-10-31T12:37:17.000Z","size":2324,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T07:55:57.206Z","etag":null,"topics":["autoscaler","autoscaling","aws","cloudstack","k3s","k3s-cluster","kubeadm","kubeadm-cluster","kubernetes","kubernetes-cluster","kubernetes-deployment","kubernetes-setup","lxd","lxd-container","openstack","rke2","vmware-fusion","vmware-vsphere","vmware-workstation","vmware-workstation-17-pro"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-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,"zenodo":null}},"created_at":"2024-01-07T15:29:52.000Z","updated_at":"2025-06-09T14:36:32.000Z","dependencies_parsed_at":"2024-10-31T13:32:57.736Z","dependency_job_id":"0f4aef90-4f24-4eef-8d64-c5ce6e5a1289","html_url":"https://github.com/Fred78290/autoscaled-masterkube-multipass","commit_stats":null,"previous_names":["fred78290/autoscaled-masterkube-multipass"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fred78290/autoscaled-masterkube-multipass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fautoscaled-masterkube-multipass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fautoscaled-masterkube-multipass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fautoscaled-masterkube-multipass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fautoscaled-masterkube-multipass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fred78290","download_url":"https://codeload.github.com/Fred78290/autoscaled-masterkube-multipass/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fautoscaled-masterkube-multipass/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29149603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["autoscaler","autoscaling","aws","cloudstack","k3s","k3s-cluster","kubeadm","kubeadm-cluster","kubernetes","kubernetes-cluster","kubernetes-deployment","kubernetes-setup","lxd","lxd-container","openstack","rke2","vmware-fusion","vmware-vsphere","vmware-workstation","vmware-workstation-17-pro"],"created_at":"2024-11-14T23:37:04.781Z","updated_at":"2026-02-06T04:03:23.603Z","avatar_url":"https://github.com/Fred78290.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Licence](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://github.com/Fred78290/autoscaled-masterkube-multipass/blob/master/LICENSE)\n\n# Introduction\n\nThis project contains everthing to create an single plane or HA autoscaling kubernetes cluster with following supported engine on following plateform.\n\nSupported kubernetes engine are\n\n* k3s\n* rke2\n* kubeadm\n* microk8s\n\nSupported plateform are\n\n* AWS\n* CloudStack\n* Multipass\n* OpenStack\n* VMWare Fusion\n* VMWare Workstation\n* vSphere\n* LXD\n\nThe cluster support also autoscaling by using [kubernetes-cloud-autoscaler](https://github.com/Fred78290/kubernetes-cloud-autoscaler) and [grpc autoscaler](https://github.com/Fred78290/autoscaler) or **vanilla autoscaler**\n\n## Prerequistes\n\nEnsure that you have sudo right and the following tools installed\n\n| Linux | MacOS |\n| --- | --- |\n| envsubst | envsubst |\n| helm | helm |\n| kubectl | kubectl |\n| jq | jq |\n| yq | yq |\n| cfssl | cfssl |\n|| gnu-getopt |\n|| gsed |\n|| gbase64 |\n\nYou must also install depending target plateform\n\n| Multipass | OpenStack | CloudStack | LXD | VSphere | VMWare Desktop | Aws |\n| --- | --- | --- | --- | --- | --- | --- |\n| packer | packer | packer | packer | govc | vmware-vdiskmanager | aws |\n| packer-plugin-qemu | packer-plugin-openstack | packer-plugin-cloudstack | packer-plugin-lxd | - | ovftool | |\n| multipass | openstack-client | lxc | cmk | - | kubernetes-desktop-autoscaler-utility  | |\n| kubernetes-desktop-autoscaler-utility | - | - | - | - | - | |\n| qemu-img | | | | | | |\n\nSome of these tools could be installed via homebrew\n\n## Create the masterkube\n\nThe simply way to create the masterkube is to run [./bin/create-masterkube.sh --plateform=\\\u003caws|cloudstack|desktop|multipass|openstack|lxd\\\u003e --kube-engine=\\\u003ck3s|rke2|kubeadm|microk8s\\\u003e](./bin/create-masterkube.sh)\n\nSome needed file are located in:\n\n| Name | Description |\n| --- | --- |\n| `bin` | Essentials scripts to build the master kubernetes node  |\n| `bin/plateform` | Essentials scripts for target plateform  |\n| `etc/ssl/\u003cchoosen domain\u003e`  | Your CERT for https. Autosigned will be generated if empty `cert.pem, chain.pem, fullchain.pem, privkey.pem` |\n| `images`  | Generated qemu-image for multipass plateform |\n| `templates`  | Templates files to deploy pod \u0026 service |\n| `tools`  | Bootstrap files installed in nodes |\n\nThe first thing done by this script is to create an Ubuntu-24.04 image with choosen kubernetes engine installed with needed components. The image will be stored on the targeted plateform (template VM, AMI, qemu-img, ....)\n\nNext step will be to launch a VM on choosen plateform and create a master node.\n\n## Private DNS registration\n\nFor easier integration the tool allows to register cluster in private Route53 zone or in an existing DNS server RFC2136 compliant. It's possible also to deploy an internal Bind9 server and use it for private domain registration. If the plateform is openstack and designate is available with your private domain, it wil be used\n\n## Public DNS registration\n\nIf you decide to expose the cluster on internet, the tool have the ability to register the cluster in public Route53 zone or in GoDaddy resolver. If the plateform is openstack and designate is available with your public domain, it wil be used.\n\n## Installation per plateform\n\n[Install on AWS](docs/aws/README.md)\n\n[Install on CloudStack](docs/cloudstack/README.md)\n\n[Install on Multipass](docs/multipass/README.md)\n\n[Install on OpenStack](docs/opestack/README.md)\n\n[Install on VMWare Workstation or VMWare Fusion](docs/desktop/README.md)\n\n[Install on vSphere](docs/vsphere/README.md)\n\n[Install on LXD](docs/lxd/README.md)\n\nDuring the process many files created will be located at\n\n| Name | Description |\n| --- | --- |\n| `config/\u003cgenerated nodegroup name\u003e/cluster` | Essentials file generated by kubernetes engine needed to join node  |\n| `config/\u003cgenerated nodegroup name\u003e/config`  | Configuration file generated during the build process  |\n| `config/\u003cgenerated nodegroup name\u003e/config/deployment`  | Files generated by deployment process |\n\nThe nodegroup name have this pattern `NODEGROUP_NAME=${PLATEFORM}-${DEPLOY_MODE}-${KUBERNETES_DISTRO}`\n\nThe process install also following kubernetes components\n\n* cert manager\n* external dns\n* kubernetes dashboard and metrics scraper\n* kubeapps\n* rancher\n* nginx ingress controller\n\nThe kubernetes dashboard is reachable at the URL **https://dashboard-\\\u003cgenerated-groupname\\\u003e.\\\u003cyour-domain\\\u003e/**\n\nTo connect to the dashboard, copy paste the token from file [config/\\\u003cgenerated nodegroup name\\\u003ecluster/dashboard-token](./cluster/dashboard-token)\n\nThe kubeapps UI is reachable at the URL **https://kubeapps-\\\u003cgenerated-groupname\\\u003e.\\\u003cyour-domain\\\u003e/**\n\nThe Rancher UI is reachable at the URL **https://rancher-\\\u003cgenerated-groupname\\\u003e.\\\u003cyour-domain\\\u003e/**\n\nIt also deployed a replicaset helloworld to demonstrate the ability of autoscaling\n\n## Raise autoscaling\n\nTo scale up or down the cluster, just play with `kubectl scale`\n\nTo scale fresh masterkube `kubectl scale --replicas=2 deploy/helloworld -n kube-public`\n\n## Delete master kube and worker nodes\n\nTo delete the master kube and associated worker nodes, just run the command [delete-masterkube.sh](./bin/delete-masterkube.sh)\n\n## Common command line arguments\n\nVariable definitions are located in the file [common.sh](./bin/common.sh).\n\nVariables could be overrided in file located ./bin/plateform/\\\u003cplateform\\\u003e/override.sh\n\n| Parameter | Description | Default |\n| --- | --- |--- |\n| --help \\| -h | Display usage | |\n| --plateform=[vsphere\\|aws\\|desktop\\|multipass] | Where to deploy cluster | ${PLATEFORM} |\n| --verbose \\| -v | Verbose | NO |\n| --trace \\| -x | Trace execution | NO |\n| --resume \\| -r | Allow to resume interrupted creation of cluster kubernetes | |\n| --delete \\| -d | Delete cluster and exit | |\n| --distribution | Ubuntu distribution to use | ${UBUNTU_DISTRIBUTION} |\n| --create-image-only | Create image only | NO |\n| --upgrade | Upgrade existing cluster to upper version of kubernetes | |\n| | **Flags to set some location informations** | |\n| --configuration-location=\\\u003cpath\\\u003e | Specify where configuration will be stored | ${CONFIGURATION_LOCATION} |\n| --ssl-location=\\\u003cpath\\\u003e | Specify where the etc/ssl dir is stored | ${SSL_LOCATION} |\n| --defs=\\\u003cpath\\\u003e | Specify the hidden plateform variables | ./bin/plateform/${PLATEFORM}/vars.def |\n| | **Design the kubernetes cluster** | |\n| --autoscale-machine=\\\u003cvalue\\\u003e | Override machine type used for auto scaling | ${AUTOSCALE_MACHINE} |\n| --cni-plugin=\\\u003cvalue\\\u003e | Override CNI plugin | ${CNI_PLUGIN} |\n| --cni-version=\\\u003cvalue\\\u003e | Override CNI plugin version | ${CNI_VERSION} |\n| --container-runtime=[containerd\\|cri-o] | Specify which OCI runtime to use | ${CONTAINER_ENGINE} |\n| --control-plane-machine=\\\u003cvalue\\\u003e | Override machine type used for control plane | ${CONTROL_PLANE_MACHINE} |\n| --ha-cluster \\| -c | Allow to create an HA cluster | ${HA_CLUSTER} |\n| --kube-engine=[kubeadm\\|k3s\\|rke2\\|microk8s] | Which kubernetes distribution to use: kubeadm, k3s, rke2 | ${KUBERNETES_DISTRO} |\n| --kube-version \\| -k=\\\u003cvalue\\\u003e | Override the kubernetes version | ${KUBERNETES_VERSION} |\n| --max-pods=\\\u003cvalue\\\u003e | Specify the max pods per created VM | ${MAX_PODS} |\n| --nginx-machine=\\\u003cvalue\\\u003e | Override machine type used for nginx as ELB | ${NGINX_MACHINE} |\n| --node-group=\\\u003cvalue\\\u003e | Override the node group name | ${NODEGROUP_NAME} |\n| --ssh-private-key=\\\u003cpath\\\u003e | Override ssh key is used | ${SSH_PRIVATE_KEY} |\n| --transport=[tcp\\|unix] | Override the transport to be used between autoscaler and kubernetes-cloud-autoscaler | unix |\n| --worker-node-machine=\\\u003cvalue\\\u003e | Override machine type used for worker nodes | ${WORKER_NODE_MACHINE} |\n| --worker-nodes=\\\u003cvalue\\\u003e | Specify the number of worker nodes created in HA cluster | ${WORKERNODES} |\n| --create-external-etcd \\| -e | Create an external HA etcd cluster | ${EXTERNAL_ETCD} |\n| --use-cloud-init | Use cloud-init to configure autoscaled nodes instead off ssh | ${USE_CLOUDINIT_TO_CONFIGURE} |\n| | **Design domain** | |\n| --public-domain=\\\u003cvalue\\\u003e | Specify the public domain to use | ${PUBLIC_DOMAIN_NAME} |\n| --private-domain=\\\u003cvalue\\\u003e | Specify the private domain to use | ${PRIVATE_DOMAIN_NAME} |\n| --dashboard-hostname=\\\u003cvalue\\\u003e | Specify the hostname for kubernetes dashboard | ${DASHBOARD_HOSTNAME} |\n| --external-dns-provider=[none\\|aws\\|godaddy\\|rfc2136\\|designate] | Specify external dns provider. | ${EXTERNAL_DNS_PROVIDER} |\n| | **Cert Manager** | |\n| --cert-email=\\\u003cvalue\\\u003e | Specify the mail for lets encrypt | ${CERT_EMAIL} |\n| --use-zerossl | Specify cert-manager to use zerossl | ${USE_ZEROSSL} |\n| --use-self-signed-ca | Specify if use self-signed CA | ${USE_CERT_SELFSIGNED} |\n| --zerossl-eab-kid=\\\u003cvalue\\\u003e | Specify zerossl eab kid | ${CERT_ZEROSSL_EAB_KID} |\n| --zerossl-eab-hmac-secret=\\\u003cvalue\\\u003e | Specify zerossl eab hmac secret | ${CERT_ZEROSSL_EAB_HMAC_SECRET} |\n| | **GoDaddy** | |\n| --godaddy-key=\\\u003cvalue\\\u003e | Specify godaddy api key | ${CERT_GODADDY_API_KEY:=GODADDY_API_KEY} |\n| --godaddy-secret=\\\u003cvalue\\\u003e | Specify godaddy api secret | ${CERT_GODADDY_API_SECRET:=GODADDY_API_SECRET} |\n| | **Route53** | |\n| --route53-zone-id=\\\u003cvalue\\\u003e | Specify the route53 zone id | ${AWS_ROUTE53_PUBLIC_ZONE_ID} |\n| --route53-access-key=\\\u003cvalue\\\u003e | Specify the route53 aws access key | ${AWS_ROUTE53_ACCESSKEY} |\n| --route53-secret-key=\\\u003cvalue\\\u003e | Specify the route53 aws secret key | ${AWS_ROUTE53_SECRETKEY} |\n| | **Flags for autoscaler** | |\n| --grpc-provider=[grpc\\|externalgrpc] | autoscaler flag | ${GRPC_PROVIDER} |\n| --max-nodes-total=\\\u003cvalue\\\u003e | autoscaler flag | ${MAXTOTALNODES} |\n| --cores-total=\\\u003cvalue\\\u003e | autoscaler flag | ${CORESTOTAL} |\n| --memory-total=\\\u003cvalue\\\u003e | autoscaler flag | ${MEMORYTOTAL} |\n| --max-autoprovisioned-node-group-count=\\\u003cvalue\\\u003e | autoscaler flag | ${MAXAUTOPROVISIONNEDNODEGROUPCOUNT} |\n| --scale-down-enabled=\\\u003cvalue\\\u003e | autoscaler flag | ${SCALEDOWNENABLED} |\n| --scale-down-utilization-threshold=\\\u003cvalue\\\u003e | autoscaler flag | ${SCALEDOWNUTILIZATIONTHRESHOLD} |\n| --scale-down-gpu-utilization-threshold=\\\u003cvalue\\\u003e | autoscaler flag | ${SCALEDOWNGPUUTILIZATIONTHRESHOLD} |\n| --scale-down-delay-after-add=\\\u003cvalue\\\u003e | autoscaler flag | ${SCALEDOWNDELAYAFTERADD} |\n| --scale-down-delay-after-delete=\\\u003cvalue\\\u003e | autoscaler flag | ${SCALEDOWNDELAYAFTERDELETE} |\n| --scale-down-delay-after-failure=\\\u003cvalue\\\u003e | autoscaler flag | ${SCALEDOWNDELAYAFTERFAILURE} |\n| --scale-down-unneeded-time=\\\u003cvalue\\\u003e | autoscaler flag | ${SCALEDOWNUNEEDEDTIME} |\n| --scale-down-unready-time=\\\u003cvalue\\\u003e | autoscaler flag | ${SCALEDOWNUNREADYTIME} |\n| --max-node-provision-time=\\\u003cvalue\\\u003e | autoscaler flag | ${MAXNODEPROVISIONTIME} |\n| --unremovable-node-recheck-timeout=\\\u003cvalue\\\u003e | autoscaler flag | ${UNREMOVABLENODERECHECKTIMEOUT} |\n\n## Raise autoscaling\n\nTo scale up or down the cluster, just play with `kubectl scale`\n\nTo scale fresh masterkube `kubectl scale --replicas=2 deploy/helloworld -n kube-public`\n\n## Delete master kube and worker nodes\n\nTo delete the master kube and associated worker nodes, just run the command [./bin/delete-masterkube.sh --plateform=\\\u003cplateform\\\u003e --kube-engine=\\\u003cengine\\\u003e](./bin/delete-masterkube.sh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffred78290%2Fautoscaled-masterkube-multipass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffred78290%2Fautoscaled-masterkube-multipass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffred78290%2Fautoscaled-masterkube-multipass/lists"}