@@ -4,7 +4,7 @@ Useful Kubernetes Additions
4
4
5
5
For the quickest path through the tutorial use an x86 linux machine
6
6
and follow the instructions here `setup_kubernetes `. For additional
7
- non-essential features use this page.
7
+ options and non-essential features use this page.
8
8
9
9
Install the Kubernetes Dashboard
10
10
--------------------------------
@@ -55,13 +55,95 @@ Finally, start a proxy and goto the Dashboard URL, use the above token to log in
55
55
kubectl proxy &
56
56
browse to http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy
57
57
58
+ .. _raspberry:
58
59
59
60
Installing on a Raspberry Pi
60
61
----------------------------
61
62
63
+ Raspberry Pi3 and Pi4 can run the k3s server. The more memory installed the
64
+ better.
65
+
66
+ We have not worked out how to run the client tools kubectl and helm on the Pi
67
+ as yet. You can run these on a separate linux or Windows workstation. There
68
+ are arm64 versions of helm and kubectl so we expect that the
69
+ ` 64bit Raspberry Pi OS` _ would be able to run these, but this is untested.
70
+
62
71
For a Raspberry Pi you need a couple of extra settings to get K3S running::
63
72
64
73
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
65
74
# edit /boot/cmdline and make sure the single line contains:
66
75
# cgroup_memory=1 cgroup_enable=memory
67
76
sudo reboot
77
+
78
+ .. _64bit Raspberry Pi OS: https://www.raspberrypi.org/forums/viewtopic.php?t=275370
79
+
80
+ .. _wsl:
81
+
82
+ Installing on Windows Subsystem for Linux
83
+ -----------------------------------------
84
+
85
+ WSL2 gives you a linux distribution running within Windows, the following
86
+ additional instructions explain how to use this platform.
87
+
88
+ Install k3s server
89
+ ~~~~~~~~~~~~~~~~~~
90
+
91
+ First you need Windows 10 OS build 20262 or higher.
92
+ Then follow the ` WSL2 instructions` _.
93
+ When installing the linux distribution, choose Ubuntu.
94
+
95
+ Start a new WSL2 Window and bring up the k3s server as follows::
96
+
97
+ wget https://github.com/k3s-io/k3s/releases/download/v1.21.2%2Bk3s1/k3s
98
+ sudo install -o root -g root -m 0755 k3s /usr/local/bin/k3s
99
+ sudo k3s server
100
+
101
+ There are no services in WSL so this k3s server will run in the foreground.
102
+ You need to start a second WLS window to continue as follows::
103
+
104
+ mkdir .kube
105
+ sudo cp /etc/rancher/k3s/k3s.yaml .kube/config
106
+ sudo chown giles .kube/config
107
+
108
+ At this point you can return to the main instructions at ` install_kubectl` .
109
+
110
+ Get X11 GUI to Work with WSL
111
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112
+
113
+ When you come to launch the GUI later on you will need some additional steps
114
+ as follows.
115
+
116
+ First you will need install ` docker for WSL` _.
117
+
118
+ You will also require an ` X11 Server for Windows` _. When you run the server
119
+ choose the option **Disable Access Control** as follows:
120
+
121
+ .. image:: ../images/vcxsrv.png
122
+ :align: center
123
+
124
+ The networking for docker on WSL will not broadcast between containers so
125
+ you need to use EPICS_CA_ADDR_LIST to get edm to see the example IOC
126
+ PVs. To do this perform the following steps to get the name of the
127
+ example IOC pod and discover its IP address, then pass that to the
128
+ edm container::
129
+
130
+ cd bl00i
131
+
132
+ kubectl get pods
133
+ NAME READY STATUS RESTARTS AGE
134
+ example-6779d4dcf-g2cpm 1/1 Running 2 19h
135
+
136
+ kubectl exec -it example-6779d4dcf-g2cpm -- busybox ifconfig eth0
137
+ eth0 Link encap:Ethernet HWaddr 70:85:C2:DB:70:96
138
+ inet addr:192.168.86.33 Bcast:192.168.86.255 Mask:255.255.255.0
139
+
140
+ export DISPLAY=$( awk ' /nameserver / {print $2; exit}' /etc/resolv.conf 2> /dev/null) :0
141
+ export LIBGL_ALWAYS_INDIRECT=1
142
+
143
+ # IP ADDRESS from above kubectl command
144
+ ./opi/stexample-gui.sh -e EPICS_CA_ADDR_LIST=192.168.86.33
145
+
146
+
147
+ .. _WSL2 instructions: https://docs.microsoft.com/en-us/windows/wsl/install-win10
148
+ .. _docker for WSL: https://docs.docker.com/docker-for-windows/wsl/
149
+ .. _X11 Server for Windows: https://sourceforge.net/projects/vcxsrv/
0 commit comments