This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:ubuntu:kubernetes [2019/10/23 01:49] – created lunetikk | linux:ubuntu:kubernetes [2019/10/23 14:09] (current) – lunetikk | ||
---|---|---|---|
Line 10: | Line 10: | ||
sudo apt-get install -qy kubelet kubeadm kubectl | sudo apt-get install -qy kubelet kubeadm kubectl | ||
apt-mark hold kubelet kubeadm kubectl | apt-mark hold kubelet kubeadm kubectl | ||
- | < | + | </code> |
===== Configuration ===== | ===== Configuration ===== | ||
Line 23: | Line 23: | ||
Set up the ip configuration, | Set up the ip configuration, | ||
< | < | ||
- | kubeadm init --apiserver-advertise-address=10.0.0.1 --pod-network-cidr=192.168.0.0/ | + | kubeadm init --apiserver-advertise-address=10.0.0.2 --pod-network-cidr=192.168.0.0/ |
- | kubeadm init --pod-network-cidr=192.168.0.0/ | + | #kubeadm init --pod-network-cidr=192.168.0.0/ |
</ | </ | ||
Line 37: | Line 37: | ||
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...` | [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...` | ||
To see the stack trace of this error execute with --v=5 or higher | To see the stack trace of this error execute with --v=5 or higher | ||
+ | </ | ||
+ | |||
+ | To fix the error, disable swap | ||
+ | < | ||
+ | swapoff -a | ||
+ | |||
+ | #should be 0 now | ||
+ | free -m | ||
+ | total used free shared | ||
+ | Mem: | ||
+ | Swap: | ||
+ | |||
+ | </ | ||
+ | |||
+ | Execute the ip configuration again, which should now be possible. | ||
+ | |||
+ | If the initialization was successful, create a new user. | ||
+ | < | ||
+ | useradd -s /bin/bash -m kubernetes | ||
+ | su - kubernetes | ||
+ | mkdir -p $HOME/.kube | ||
+ | sudo cp -i / | ||
+ | sudo chown $(id -u):$(id -g) $HOME/ | ||
+ | </ | ||
+ | |||
+ | Next you need to deploy a pod network.\\ | ||
+ | Find some here: https:// | ||
+ | |||
+ | I use calico, which can be deployed via | ||
+ | < | ||
+ | kubectl apply -f https:// | ||
+ | </ | ||
+ | |||
+ | ==== Dashboard ==== | ||
+ | |||
+ | Find the dashboard for your kubernetes version here:\\ | ||
+ | [[https:// | ||
+ | |||
+ | You can see your version via | ||
+ | < | ||
+ | kubeadm version | ||
</ | </ | ||
Line 44: | Line 85: | ||
^ Command | ^ Command | ||
- | | | + | | |
+ | | kubeadm reset | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
Line 68: | Line 110: | ||
[WARNING IsDockerSystemdCheck]: | [WARNING IsDockerSystemdCheck]: | ||
+ | Reason why | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
+ | |||
+ | * validated version of docker? | ||
+ | |||
+ | [WARNING SystemVerification]: | ||
+ | |||
+ | * management ip | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | kubectl edit deployment kubernetes-dashboard -n kube-system NAMESPACE anders!!! | ||
+ | kein ttl im dashboard | ||