raspberry
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
raspberry [2022/10/05 06:50] – skipidar | raspberry [2023/03/29 06:56] (current) – [Remote install of image per ssh] skipidar | ||
---|---|---|---|
Line 693: | Line 693: | ||
- | === Install OS === | + | === Install OS Raspberry === |
+ | https:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | === Install OS Ubuntu | ||
Use Ubuntu Server 22.04.1. The Current LTS version. | Use Ubuntu Server 22.04.1. The Current LTS version. | ||
Line 787: | Line 795: | ||
as in https:// | as in https:// | ||
+ | |||
+ | |||
+ | Start installation | ||
< | < | ||
# seem to have been required to set ownership on configs in the past https:// | # seem to have been required to set ownership on configs in the past https:// | ||
export K3S_KUBECONFIG_MODE=" | export K3S_KUBECONFIG_MODE=" | ||
- | # the command | + | # the command |
- | # curl -sfL https:// | + | curl -sfL https:// |
+ | </ | ||
- | # or same effect can be reached by passing write-kubeconfig-mode | ||
- | curl -sfL https:// | ||
- | + | <sxh shell> | |
- | # Kubeconfig is written | + | pi@pi2:~$ curl -sfL https:// |
- | sudo k3s kubectl get node | + | [INFO] |
- | </code> | + | [INFO] |
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | [INFO] | ||
+ | Created symlink / | ||
+ | [INFO] | ||
+ | </sxh> | ||
Line 837: | Line 863: | ||
</ | </ | ||
+ | You can check if the master node is working. At this point, there is only one Master node | ||
+ | < | ||
+ | k3s kubectl get node | ||
+ | </ | ||
<sxh shell> | <sxh shell> | ||
- | pi@pi2: | + | pi@pi2: |
- | [INFO] | + | NAME |
- | [INFO] | + | pi2 Ready control-plane, |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | [INFO] | + | |
- | Created symlink / | + | |
- | [INFO] | + | |
</ | </ | ||
- | Run Server | + | By default, the Kubernetes API server listens on port **6443**. |
+ | You can check if the k8s server is listening on the port 6443 | ||
+ | < | ||
+ | sudo ss -tulpn | grep :6443 | ||
+ | </ | ||
+ | |||
+ | |||
+ | <sxh shell> | ||
+ | pi@pi2:~$ sudo ss -tulpn | grep :6443 | ||
+ | tcp | ||
+ | |||
+ | pi@pi2:~$ sudo ps aux | grep 6150 | ||
+ | root 6150 53.9 52.2 1250788 484324 ? Ssl 06:46 8:15 / | ||
+ | pi 9717 2.0 0.1 | ||
+ | |||
+ | pi@pi2:~$ ls / | ||
+ | crictl | ||
+ | </ | ||
+ | |||
+ | ==Attach worker nodes to master== | ||
+ | |||
+ | On k8s server / mater - get teh token | ||
< | < | ||
- | # On a different node run the below command. | ||
# NODE_TOKEN comes from / | # NODE_TOKEN comes from / | ||
- | sudo k3s agent --server | + | sudo cat / |
</ | </ | ||
+ | <sxh shell> | ||
+ | pi@pi2:~$ sudo cat / | ||
+ | T10eb2811f7856b5895acac5179c6ae29787957f5289bb00737cf144ac58da851c4:: | ||
+ | </ | ||
+ | |||
+ | |||
+ | Figure out the ip of your server | ||
+ | < | ||
+ | ip a | ||
+ | </ | ||
+ | |||
+ | The **eth0** adapter is relevant for me. | ||
+ | <sxh shell> | ||
+ | pi@pi2:~$ ip a | ||
+ | 1: lo: < | ||
+ | link/ | ||
+ | inet 127.0.0.1/8 scope host lo | ||
+ | | ||
+ | inet6 ::1/128 scope host | ||
+ | | ||
+ | 2: eth0: < | ||
+ | link/ether b8: | ||
+ | inet 192.168.191.32/ | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 3: wlan0: < | ||
+ | link/ether b8: | ||
+ | 4: flannel.1: < | ||
+ | link/ether 3a: | ||
+ | inet 10.42.0.0/ | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 5: cni0: < | ||
+ | link/ether 2e: | ||
+ | inet 10.42.0.1/ | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 6: vethf8a47774@if2: | ||
+ | link/ether 22: | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 7: veth4dd4db4c@if2: | ||
+ | link/ether 92: | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 10: veth82490627@if2: | ||
+ | link/ether 92: | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 11: veth99adcc15@if2: | ||
+ | link/ether f2: | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 12: veth748d4e42@if2: | ||
+ | link/ether 32: | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | </ | ||
+ | |||
+ | |||
+ | On a different node run the below command. | ||
+ | < | ||
+ | export K3S_KUBECONFIG_MODE=" | ||
+ | export K3S_URL=" | ||
+ | export K3S_TOKEN=" | ||
+ | |||
+ | curl -sfL https:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== Remote install of image per ssh ==== | ||
+ | see | ||
+ | https:// | ||
+ | |||
+ | * Login via SSH to the system on which the image is located and read it via dd. The stdout is tunneled through SSH to the local system. | ||
+ | * Using pv you can see how much data is transferred. (You may need to install it with apt-get, but you can also omit this.) | ||
+ | * funzip extracts the first file and sends it to stdout. | ||
+ | * dd writes it to the SD-card. | ||
+ | |||
+ | < | ||
+ | |||
+ | #This will enable the reset of the Raspberry without regular commands. | ||
+ | echo 1 > / | ||
+ | |||
+ | #download image | ||
+ | curl -L http:// | ||
+ | |||
+ | # restart the pi (Sofortiger Neustart des Systems (ohne Synchronisation der Speichermedien!)) | ||
+ | echo b > / | ||
+ | </ |
raspberry.1664952657.txt.gz · Last modified: by skipidar