Site Tools


linux:ubuntu:kubernetes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:ubuntu:kubernetes [2019/10/23 01:49] – created lunetikklinux: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>+</code>
  
 ===== Configuration ===== ===== Configuration =====
Line 23: Line 23:
 Set up the ip configuration, the "apiserver-advertise-address" has to be your management ip Set up the ip configuration, the "apiserver-advertise-address" has to be your management ip
 <code> <code>
-kubeadm init --apiserver-advertise-address=10.0.0.--pod-network-cidr=192.168.0.0/16                                +kubeadm init --apiserver-advertise-address=10.0.0.--pod-network-cidr=192.168.0.0/16                                
-kubeadm init --pod-network-cidr=192.168.0.0/16+#kubeadm init --pod-network-cidr=192.168.0.0/16
 </code> </code>
  
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
 +</code>
 +
 +To fix the error, disable swap
 +<code>
 +swapoff -a
 +
 +#should be 0 now
 +free -m
 +              total        used        free      shared  buff/cache   available
 +Mem:           xxxx         xxx        xxxx         xxx        xxxx        xxxx
 +Swap:                                 0
 +
 +</code>
 +
 +Execute the ip configuration again, which should now be possible.
 +
 +If the initialization was successful, create a new user.
 +<code>
 +useradd -s /bin/bash -m kubernetes                                       
 +su - kubernetes
 +mkdir -p $HOME/.kube
 +sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
 +sudo chown $(id -u):$(id -g) $HOME/.kube/config
 +</code>
 +
 +Next you need to deploy a pod network.\\
 +Find some here: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network
 +
 +I use calico, which can be deployed via
 +<code>
 +kubectl apply -f https://docs.projectcalico.org/v3.8/manifests/calico.yaml
 +</code>
 +
 +==== Dashboard ====
 +
 +Find the dashboard for your kubernetes version here:\\
 +[[https://github.com/kubernetes/dashboard/releases]]
 +
 +You can see your version via 
 +<code>
 +kubeadm version
 </code> </code>
  
Line 44: Line 85:
  
 ^  Command  ^  Function  ^ ^  Command  ^  Function  ^
-|  Placeholder   |  Placeholder   |+|  kubectl get pods --all-namespaces   |  show pods   | 
 +|  kubeadm reset    reverts changes made via "kubeadm init" and "kubeadm join"   |
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
Line 68: Line 110:
 [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/ [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
  
 +Reason why
 +
 +https://github.com/kubernetes/kubeadm/issues/1394#issuecomment-462878219
 +
 +
 +
 +  * validated version of docker?
 +
 +[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.4. Latest validated version: 18.09
 +
 +  * management ip
 +
 +https://github.com/kubernetes/kubernetes/issues/33618
 +
 +
 +
 +
 +
 +kubectl edit deployment kubernetes-dashboard -n kube-system NAMESPACE anders!!!
 +kein ttl im dashboard
  
linux/ubuntu/kubernetes.1571788180.txt.gz · Last modified: 2019/10/23 01:49 by lunetikk