Skip to content

Commit 2a7f723

Browse files
committed
docs: better doc for backup
1 parent 8268495 commit 2a7f723

File tree

1 file changed

+64
-61
lines changed

1 file changed

+64
-61
lines changed

README.md

Lines changed: 64 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ defaults for running production workload.
3333
| RKE2 | [v1.29.0+rke2r1](https://github.com/rancher/rke2/releases/tag/v1.29.0+rke2r1) |
3434
| OpenStack Cloud Controller | [v1.28.1](https://github.com/kubernetes/cloud-provider-openstack/tree/v1.28.1/charts/openstack-cloud-controller-manager) |
3535
| OpenStack Cinder | [v1.28.1](https://github.com/kubernetes/cloud-provider-openstack/tree/v1.28.1/charts/cinder-csi-plugin) |
36-
| Velero | [v6.0.0](https://github.com/vmware-tanzu/helm-charts/tree/velero-6.0.0/charts/velero) |
36+
| Velero | [v6.0.0](https://github.com/vmware-tanzu/helm-charts/tree/velero-6.0.0/charts/velero) |
3737
| Kube-vip | [v0.7.2](https://github.com/kube-vip/kube-vip/releases/tag/v0.7.2) |
38+
3839
## Getting started
3940

4041
```bash
@@ -71,6 +72,8 @@ yourself `/etc/rancher/rke2/rke2.yaml` on server nodes.
7172
## Restoring a backup
7273

7374
```
75+
# remove server url from rke2 config
76+
vim /etc/rancher/rke2/config.yaml
7477
# ssh into one of the server nodes (see terraform output -json)
7578
# restore s3 snapshot (see restore_cmd output of the terraform module):
7679
sudo systemctl stop rke2-server
@@ -85,6 +88,66 @@ sudo systemctl start rke2-server
8588
sudo reboot
8689
```
8790

91+
## Infomaniak OpenStack
92+
93+
A stable, performant and fully equipped Kubernetes cluster in Switzerland for as
94+
little as CHF 18.—/month (at the time of writing):
95+
96+
- 1 server 2cpu/4Go (= master)
97+
- 1 agent 1cpu/2Go (= worker)
98+
- 1 floating IP for admin access (ssh and kubernetes api)
99+
- 1 floating IP for private network gateway
100+
101+
| Flavour | CHF/month |
102+
| -------------------------------------------------------------------- | --------- |
103+
| 5.88 + 2.93 (instances) + 0.09×2×(6+8) (block storage) + 2×3.34 (IP) | 18.— |
104+
| 1x2cpu/4go server with 1x4cpu/16Go worker | ~28.— |
105+
| 3x2cpu/4go HA servers with 1x4cpu/16Go worker | ~41.— |
106+
| 3x2cpu/4go HA servers with 3x4cpu/16Go workers | ~76.— |
107+
108+
You may also want to add a load-balancer and bind an additional floating IP for
109+
public access (e.g. for an ingress controller like ingress-nginx), that will add
110+
10.00 (load-balancer) + 3.34 (IP) = CHF 13.34/month. Note that physical
111+
load-balancer can be shared by many Kubernetes load-balancers when there is no
112+
port collision.
113+
114+
See their technical [documentation](https://docs.infomaniak.cloud) and
115+
[pricing](https://www.infomaniak.com/fr/hebergement/public-cloud/tarifs).
116+
117+
## More on RKE2 & OpenStack
118+
119+
[RKE2 cheat sheet](https://gist.github.com/superseb/3b78f47989e0dbc1295486c186e944bf)
120+
121+
```
122+
# alias already set on the nodes
123+
crictl
124+
kubectl (server only)
125+
126+
# logs
127+
sudo systemctl status rke2-server.service
128+
journalctl -f -u rke2-server
129+
130+
sudo systemctl status rke2-agent.service
131+
journalctl -f -u rke2-agent
132+
133+
less /var/lib/rancher/rke2/agent/logs/kubelet.log
134+
less /var/lib/rancher/rke2/agent/containerd/containerd.log
135+
less /var/log/cloud-init-output.log
136+
137+
# check san
138+
openssl s_client -connect 192.168.42.3:10250 </dev/null 2>/dev/null | openssl x509 -inform pem -text
139+
140+
# defrag etcd
141+
kubectl -n kube-system exec $(kubectl -n kube-system get pod -l component=etcd --no-headers -o custom-columns=NAME:.metadata.name | head -1) -- sh -c "ETCDCTL_ENDPOINTS='https://127.0.0.1:2379' ETCDCTL_CACERT='/var/lib/rancher/rke2/server/tls/etcd/server-ca.crt' ETCDCTL_CERT='/var/lib/rancher/rke2/server/tls/etcd/server-client.crt' ETCDCTL_KEY='/var/lib/rancher/rke2/server/tls/etcd/server-client.key' ETCDCTL_API=3 etcdctl defrag --cluster"
142+
143+
# increase volume size
144+
# shutdown instance
145+
# detach volumne
146+
# expand volume
147+
# recreate node
148+
terraform apply -target='module.rke2.module.servers["server"]' -replace='module.rke2.module.servers["server"].openstack_compute_instance_v2.instance[0]'
149+
```
150+
88151
## Migration guide
89152

90153
### From v2 to v3
@@ -220,63 +283,3 @@ terraform apply -target='module.rke2.module.POOL["NODE"]'
220283
# 11. once all the nodes are upgraded, make sure that everything is well applied:
221284
terraform apply
222285
```
223-
224-
## Infomaniak OpenStack
225-
226-
A stable, performant and fully equipped Kubernetes cluster in Switzerland for as
227-
little as CHF 18.—/month (at the time of writing):
228-
229-
- 1 server 2cpu/4Go (= master)
230-
- 1 agent 1cpu/2Go (= worker)
231-
- 1 floating IP for admin access (ssh and kubernetes api)
232-
- 1 floating IP for private network gateway
233-
234-
| Flavour | CHF/month |
235-
| -------------------------------------------------------------------- | --------- |
236-
| 5.88 + 2.93 (instances) + 0.09×2×(6+8) (block storage) + 2×3.34 (IP) | 18.— |
237-
| 1x2cpu/4go server with 1x4cpu/16Go worker | ~28.— |
238-
| 3x2cpu/4go HA servers with 1x4cpu/16Go worker | ~41.— |
239-
| 3x2cpu/4go HA servers with 3x4cpu/16Go workers | ~76.— |
240-
241-
You may also want to add a load-balancer and bind an additional floating IP for
242-
public access (e.g. for an ingress controller like ingress-nginx), that will add
243-
10.00 (load-balancer) + 3.34 (IP) = CHF 13.34/month. Note that physical
244-
load-balancer can be shared by many Kubernetes load-balancers when there is no
245-
port collision.
246-
247-
See their technical [documentation](https://docs.infomaniak.cloud) and
248-
[pricing](https://www.infomaniak.com/fr/hebergement/public-cloud/tarifs).
249-
250-
## More on RKE2 & OpenStack
251-
252-
[RKE2 cheat sheet](https://gist.github.com/superseb/3b78f47989e0dbc1295486c186e944bf)
253-
254-
```
255-
# alias already set on the nodes
256-
crictl
257-
kubectl (server only)
258-
259-
# logs
260-
sudo systemctl status rke2-server.service
261-
journalctl -f -u rke2-server
262-
263-
sudo systemctl status rke2-agent.service
264-
journalctl -f -u rke2-agent
265-
266-
less /var/lib/rancher/rke2/agent/logs/kubelet.log
267-
less /var/lib/rancher/rke2/agent/containerd/containerd.log
268-
less /var/log/cloud-init-output.log
269-
270-
# check san
271-
openssl s_client -connect 192.168.42.3:10250 </dev/null 2>/dev/null | openssl x509 -inform pem -text
272-
273-
# defrag etcd
274-
kubectl -n kube-system exec $(kubectl -n kube-system get pod -l component=etcd --no-headers -o custom-columns=NAME:.metadata.name | head -1) -- sh -c "ETCDCTL_ENDPOINTS='https://127.0.0.1:2379' ETCDCTL_CACERT='/var/lib/rancher/rke2/server/tls/etcd/server-ca.crt' ETCDCTL_CERT='/var/lib/rancher/rke2/server/tls/etcd/server-client.crt' ETCDCTL_KEY='/var/lib/rancher/rke2/server/tls/etcd/server-client.key' ETCDCTL_API=3 etcdctl defrag --cluster"
275-
276-
# increase volume size
277-
# shutdown instance
278-
# detach volumne
279-
# expand volume
280-
# recreate node
281-
terraform apply -target='module.rke2.module.servers["server"]' -replace='module.rke2.module.servers["server"].openstack_compute_instance_v2.instance[0]'
282-
```

0 commit comments

Comments
 (0)