{"id":17946560,"url":"https://github.com/cstanislawski/kubelift","last_synced_at":"2026-04-27T22:32:13.531Z","repository":{"id":259532140,"uuid":"873816868","full_name":"cstanislawski/kubelift","owner":"cstanislawski","description":"Kubernetes cluster operations over SSH","archived":false,"fork":false,"pushed_at":"2024-10-25T17:41:18.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T14:45:32.117Z","etag":null,"topics":["automation","cncf","devops","k8s","kubeadm","kubernetes","kubernetes-setup","kubernetes-upgrade","kubernetes-utils","learnk8s","vm"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/cstanislawski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-10-16T19:12:04.000Z","updated_at":"2024-10-25T17:41:21.000Z","dependencies_parsed_at":"2024-10-26T08:58:33.810Z","dependency_job_id":"596e975f-af56-437b-9b03-1f1513ab0f4b","html_url":"https://github.com/cstanislawski/kubelift","commit_stats":null,"previous_names":["cstanislawski/kubelift"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cstanislawski/kubelift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstanislawski%2Fkubelift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstanislawski%2Fkubelift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstanislawski%2Fkubelift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstanislawski%2Fkubelift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cstanislawski","download_url":"https://codeload.github.com/cstanislawski/kubelift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstanislawski%2Fkubelift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32358509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"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":["automation","cncf","devops","k8s","kubeadm","kubernetes","kubernetes-setup","kubernetes-upgrade","kubernetes-utils","learnk8s","vm"],"created_at":"2024-10-29T07:06:18.421Z","updated_at":"2026-04-27T22:32:13.518Z","avatar_url":"https://github.com/cstanislawski.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubelift\n\nKubernetes cluster operations over SSH\n\n## Goal\n\nThe goal of this project is to provide a simple tool to provision a Kubernetes cluster on VMs over SSH. By going with a script-based approach, you can easily customize the installation process to fit your needs, and fail fast if something goes wrong.\n\n`kubelift` aims to be a bridge between the manual operations with `kubeadm` and the automated installation with `kubespray` requiring a lot of setup.\n\n## Requirements\n\n- A set of VM(s) with SSH access\n- Sudo privileges without password prompt (NOPASSWD in sudoers) for the SSH user\n- Internet connectivity on all nodes\n\n## Features\n\n- **Noninteractive mode** for automated operations\n- **SSH-based Operations** for secure remote management\n- **Seamless Upgrades** for managing cluster lifecycle\n- **Input Validation** ensures all provided parameters are correct\n- **Modular Design** for better maintainability\n\n## Installation\n\n### Quick Setup\n\n```bash\ncurl -LO https://raw.githubusercontent.com/cstanislawski/kubelift/main/kubelift.sh\nchmod +x kubelift.sh\n```\n\n### System-wide Installation\n\n```bash\nsudo curl -L https://raw.githubusercontent.com/cstanislawski/kubelift/main/kubelift.sh -o /usr/local/bin/kubelift\nsudo chmod +x /usr/local/bin/kubelift\n```\n\n## Usage\n\n```bash\nkubelift --help\nUsage: kubelift \u003coperation\u003e [options...]\nOperations:\n    create                                  Create a new Kubernetes cluster\n    upgrade                                 Upgrade an existing Kubernetes cluster\n    cleanup                                 Remove Kubernetes cluster\n\nOptions:\n   -h, --help                               Display this help message\n   --noninteractive \u003cbool\u003e                  Enable or disable noninteractive mode\n   --ssh-user \u003cusername\u003e                    Username to use for SSH connection\n   --kubernetes-version \u003cversion\u003e           Kubernetes version to install (create/upgrade only)\n   --control-plane-ip \u003cip\u003e                  Control plane node IP address\n   --worker-ips \u003cip1,ip2,...\u003e               Worker node IP addresses (create only)\n   --enable-control-plane-workloads \u003cbool\u003e  Enable control plane scheduling (create only)\n   --skip-reqs \u003cbool\u003e                       Skip minimum requirements validation\n   --nuke \u003cbool\u003e                            Perform deep cleanup (cleanup only)\n```\n\n### Cluster Creation\n\n```bash\n./kubelift.sh create \\\n    --noninteractive \u003cbool\u003e \\\n    --ssh-user \u003cusername\u003e \\\n    --kubernetes-version \u003cversion\u003e \\\n    --control-plane-ip \u003cip\u003e \\\n    --worker-ips \u003cip1,ip2,...\u003e \\\n    --enable-control-plane-workloads \u003cbool\u003e\n```\n\nThe create operation will:\n\n- Validate all input parameters\n- Check SSH access to all specified nodes\n- Prepare each node by:\n  - Installing Docker and containerd\n  - Installing kubeadm, kubectl, and kubelet\n  - Configuring the cgroup driver\n- Initialize the control plane node\n- Join worker nodes to the cluster\n- Install the CNI plugin (Flannel)\n- Optionally enable scheduling on the control plane node\n\n### Cluster Upgrade\n\n```bash\n./kubelift.sh upgrade \\\n    --noninteractive \u003cbool\u003e \\\n    --ssh-user \u003cusername\u003e \\\n    --kubernetes-version \u003cversion\u003e \\\n    --control-plane-ip \u003cip\u003e\n```\n\nThe upgrade operation will:\n\n- Validate all input parameters\n- Check SSH access to all nodes\n- Verify version differences between current and target\n- Check availability of target Kubernetes components\n- Upgrade the control plane node\n- Upgrade worker nodes (if present)\n\n### Cluster Cleanup\n\n```bash\n./kubelift.sh cleanup \\\n    --noninteractive \u003cbool\u003e \\\n    --ssh-user \u003cusername\u003e \\\n    --control-plane-ip \u003cip\u003e \\\n    --nuke \u003cbool\u003e # Optional\n```\n\nThe cleanup operation will:\n\n- Remove the Kubernetes cluster using kubeadm reset\n- Clean up both control plane and worker nodes\n- Preserve CNI configuration\n\n## Configuration / Environment Variables\n\nThe scripts use the following environment variables:\n\n### General variables\n\n- `NONINTERACTIVE`: Enable or disable noninteractive mode (true/false)\n- `SSH_USER`: SSH user for connecting to the nodes\n- `KUBERNETES_VERSION`: Kubernetes version to install/upgrade to\n- `CONTROL_PLANE_IP`: IP address of the control plane node\n\n### Cluster creation variables\n\n- `WORKER_IPS`: Comma-separated list of worker node IP addresses\n- `ENABLE_CONTROL_PLANE_WORKLOADS`: Enable scheduling on control plane node (true/false)\n\n## Limitations and Considerations\n\n- Host OS: Scripts assume one of the latest Ubuntu LTS versions is used on all VMs\n- Network: Scripts assume the VMs have internet connectivity\n- Minimum Resources: Ensure VMs meet the minimum Kubernetes system requirements\n- CNI Plugin: Scripts install Flannel as the default CNI plugin\n- Version-specific Limitations: The upgrade script follows a general upgrade path. Specific versions may have additional requirements\n- Downgrades: The upgrade script doesn't support downgrading the cluster\n\n## Best Practices\n\n- Always test the scripts in a non-production environment first\n- Ensure you have recent backups before performing upgrades\n- Review the scripts and understand their operation before running\n- Monitor the cluster closely after any operations\n\n## Alternatives\n\nSome of the alternatives you could consider are:\n\n- [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/) - a tool built to provide best-practice \"fast paths\" for creating Kubernetes clusters, which `kubelift` is based on\n- [kubespray](https://github.com/kubernetes-sigs/kubespray) - a set of Ansible playbooks to provision a Kubernetes cluster\n- [kubean](https://github.com/kubean-io/kubean) - an operator for cluster lifecycle management based on kubespray\n- [kops](https://github.com/kubernetes/kops) - CLI to create, destroy, upgrade and maintain production-grade Kubernetes clusters hosted on AWS/GCP with more providers in Beta/Alpha\n- [k3sup](https://github.com/alexellis/k3sup) - k3s cluster installer over SSH\n\n## TODO - unordered\n\n## CI\n\n- Add BATS - Bash Automated Testing System - for testing the scripts\n- Consider checkbashisms instead of shellcheck\n- Consider bash-language-server analysis\n- CodeQL analysis for security scanning\n- Add E2E tests with kind/k3d/Vagrant\n\n## High Priority\n\n- Allow custom CIDR ranges\n- Add support for additional logging output to a file\n- Add dry-run mode for operations\n\n## Medium Priority\n\n- Add support for more CNI plugins: Calico, Cilium\n- Cluster configuration templating\n- Add support for HA control plane\n- Add downgrades support\n- Assume presence of the flag equals true (e.g. --noninteractive) if the flag is present\n- Add k3s support\n- Add support for more Linux distributions\n\n## Low Priority\n\n- Air-gapped environments support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcstanislawski%2Fkubelift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcstanislawski%2Fkubelift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcstanislawski%2Fkubelift/lists"}