====== K8S Installation ====== ===== - Docker Installation ===== * https://docs.docker.com/engine/install/ubuntu/ * sudo apt-get remove docker docker-engine docker.io containerd runc ansible -m shell -a "apt-get update" jenkins 9751 ansible -m shell -a "apt-get update" k8s-all 9752 ansible -m shell -a "apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common" k8s-all 9753 ls 9754 ansible -m shell -a "apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common" master apt-key fingerprint 0EBFCD88 271 add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ 272 $(lsb_release -cs) \ 273 stable" 9755 ls 9756 less hosts 9757 ansible -m shell -a "apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common" k8s-all 9758 ansible -m shell -a "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -" k8s-all 9759 ansible -m shell -a 'add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \' 9760 ansible -m shell -a 'add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable' k8s-all 9761 ssh root@130.149.98.118 9762 ansible -m shell -a "apt-get install -y docker-ce docker-ce-cli containerd.io" k8s-all ===== - K8S installation with Ansible ===== * Playbooks: https://www.digitalocean.com/community/tutorials/how-to-create-a-kubernetes-cluster-using-kubeadm-on-ubuntu-18-04 * https://github.com/omerbsezer/Fast-Kubernetes#architecture * https://www.tauceti.blog/posts/kubernetes-the-not-so-hard-way-with-ansible-worker-2020/ * https://blog.mosibi.nl/all/2020/12/27/mosibi-kubernetes.html * Compare with * https://linuxconfig.org/how-to-install-kubernetes-on-ubuntu-20-04-focal-fossa-linux * https://buildvirtual.net/deploy-a-kubernetes-cluster-using-ansible/ * Cilium: * http://virtualelephant.com/2020/04/30/kubernetes-with-cilium-ansible-playbook/ ==== - Other sources ==== * https://platform9.com/blog/the-ultimate-guide-to-using-calico-flannel-weave-and-cilium/ ==== - Notes ==== * kubectl commands with normal user. ===== - Additional Resources ===== * https://m7i.org/projects/ansible-playbook-for-cilium-on-docker/ ==== - Best practices ==== * https://docs.ansible.com/ansible/2.8/user_guide/playbooks_best_practices.html#best-practices * https://polarsquad.com/blog/ansible-best-practices-part-2 ==== - Security ==== * https://github.com/topics/ddos-attacks ===== - K8S cheatsheet ===== * https://kubernetes.io/docs/reference/kubectl/cheatsheet/