You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 27, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+55-13Lines changed: 55 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# High Availability but Lean Kubernetes Cluster
2
2
3
-
A High Availability, frugal Kubernetes cluster using [Kubespray](https://github.com/kubernetes-sigs/kubespray) optimized for Contabo VPS. Deploy enterprise-grade Kubernetes at 1/10th the cost of managed solutions.
3
+
A High Availability, frugal Kubernetes cluster using [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/) optimized for Contabo VPS. Deploy enterprise-grade Kubernetes at 1/10th the cost of managed solutions.
deno run -A api/cli.ts createCluster --domainName=ctnr.io
104
102
```
105
103
104
+
## API-Based Cluster Management
105
+
106
+
This project uses a tRPC-based API for managing your Kubernetes cluster. You can interact with the API using the provided CLI tool:
107
+
108
+
```bash
109
+
# Create a new cluster based on available Contabo nodes
110
+
deno run -A api/cli.ts createCluster --domainName=ctnr.io --k8sVersion=1.31.4 --cni=calico
111
+
112
+
# Add a control plane node to the cluster
113
+
deno run -A api/cli.ts addControlPlane --domainName=ctnr.io --nodeName=ctnr.io_control-plane-1
114
+
115
+
# Add a worker node to the cluster
116
+
deno run -A api/cli.ts addWorker --domainName=ctnr.io --nodeName=ctnr.io_worker-0
117
+
118
+
# Add an etcd node to the cluster (requires manual configuration)
119
+
deno run -A api/cli.ts addEtcd --domainName=ctnr.io --nodeName=ctnr.io_etcd-0
120
+
121
+
# Remove a node from the cluster
122
+
deno run -A api/cli.ts removeNode --domainName=ctnr.io --nodeName=ctnr.io_worker-0
123
+
124
+
# Upgrade the Kubernetes cluster
125
+
deno run -A api/cli.ts upgradeCluster --domainName=ctnr.io --version=1.32.0 --packageRevision=00
126
+
127
+
# Reset the entire Kubernetes cluster
128
+
deno run -A api/cli.ts resetCluster --domainName=ctnr.io --confirm=true
129
+
130
+
# List all nodes in the cluster
131
+
deno run -A api/cli.ts listNodes --domainName=ctnr.io
132
+
133
+
# Get the kubeadm join command for adding new nodes
134
+
deno run -A api/cli.ts getJoinCommand --domainName=ctnr.io
135
+
```
136
+
137
+
### API Features
138
+
139
+
-**Automatic Node Provisioning**: When creating a cluster, the API checks for existing clusters with the same domain name and automatically claims available VPS instances.
140
+
-**Type-Safe Operations**: All API operations are fully typed with input validation.
141
+
-**Flexible Configuration**: Customize Kubernetes version, CNI, network CIDRs, and more.
142
+
-**Error Handling**: Comprehensive error handling with detailed error messages.
**DO NOT change the first control plane node (<domain-name>-control-plane-0) without understanding the implications!**
160
+
**DO NOT change the first control plane node (<domain-name>_control-plane-0) without understanding the implications!**
123
161
124
162
The first control plane node is critical for cluster stability. Modifying or removing it incorrectly can cause the entire cluster to fail. If you need to replace the first control plane node, follow these steps:
125
163
126
-
1. Rename your current nodes so that `<domain-name>-control-plane-1` becomes `<domain-name>-control-plane-0` and vice versa
164
+
1. Rename your current nodes so that `<domain-name>_control-plane-1` becomes `<domain-name>_control-plane-0` and vice versa
127
165
2. Apply the configuration
128
166
3. Only then remove the original control plane node
129
167
@@ -132,11 +170,15 @@ The first control plane node is critical for cluster stability. Modifying or rem
132
170
The project includes automated tests to verify that key components are working correctly:
133
171
134
172
-**Ingress Testing**: Tests that the Nginx ingress controller is properly configured and can route traffic to services
135
-
- Run with: `make test-ingress` or `deno test -A tests/ingress_test.ts`
173
+
- Run with: `deno test -A tests/ingress_test.ts`
136
174
- The test creates a test namespace, deployment, service, and ingress with a custom domain name
137
175
- It verifies connectivity using host-based routing with the domain name from your configuration
138
176
- Test fixtures are located in `tests/fixtures/` directory
139
177
178
+
-**ETCD Testing**: Tests that the etcd cluster is healthy and functioning correctly
179
+
- Run with: `deno test -A tests/etcd_test.ts`
180
+
- Verifies etcd cluster health, member list, alarms, and response time
0 commit comments