Advertisement
huezohuezo1990

kuber

Aug 24th, 2018
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.00 KB | None | 0 0
  1. # update and install ntp
  2. yum update -y
  3. yum install ntp -y
  4. systemctl enable ntpd --now
  5.  
  6. # Install crictl, for Cri-o, but did not work with k8s 1.10 as of yet.
  7. curl -L -O https://github.com/kubernetes-incubator/cri-tools/releases/download/v1.0.0-beta.0/crictl-v1.0.0-beta.0-linux-amd64.tar.gz
  8. tar xvf crictl-v1.0.0-beta.0-linux-amd64.tar.gz
  9. # mv crictl /usr/local/bin/crictl
  10.  
  11. cat > /etc/yum.repos.d/virt7-container-common-candidate.repo << EOF
  12. [virt7-container-common-candidate]
  13. name=virt7-container-common-candidate
  14. baseurl=https://cbs.centos.org/repos/virt7-container-common-candidate/x86_64/os/
  15. enabled=1
  16. gpgcheck=0
  17. EOF
  18.  
  19. # skip cri-o for now, use docker instead
  20. # yum install cri-o -y
  21. # systemctl enable crio --now
  22. yum install docker -y
  23. systemctl enable docker --now
  24.  
  25. # install k8s
  26. cat << EOF > /etc/yum.repos.d/kubernetes.repo
  27. [kubernetes]
  28. name=Kubernetes
  29. baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch
  30. enabled=1
  31. gpgcheck=1
  32. repo_gpgcheck=1
  33. gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
  34.  
  35. setenforce 0
  36. yum install -y kubelet kubeadm kubectl nfs-utils
  37. # I needed nfs-utils to mount nfs volumes
  38.  
  39. # extra kubelet things for cri-o
  40. #cat < /etc/systemd/system/kubelet.service.d/05-kubeadm.conf
  41. #[Service]
  42. #Environment="KUBELET_EXTRA_ARGS=--container-runtime=remote --container-runtime-endpoint=unix:///var/run/crio/crio.sock"
  43. #EOF
  44. #sed -i "s/cgroup-driver=systemd/cgroup-driver=cgroupfs/g" /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
  45. systemctl daemon-reload
  46. systemctl enable kubelet --now
  47.  
  48. # k8s sysctl settings on CentOS
  49. cat <  /etc/sysctl.d/k8s.conf
  50. net.bridge.bridge-nf-call-ip6tables = 1
  51. net.bridge.bridge-nf-call-iptables = 1
  52. EOF
  53. sysctl --system
  54.  
  55.  
  56. =========
  57.  
  58. ubuntu
  59.  
  60. https://linuxconfig.org/how-to-install-kubernetes-on-ubuntu-18-04-bionic-beaver-linux#h7-2-install-kubernetes
  61.  
  62.  
  63.  
  64.  
  65. https://docs.docker.com/
  66.  
  67. https://kubernetes.io/docs/setup/independent/install-kubeadm/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement