IT-SDK-Kubernetes-YAML
Revision as of 22:49, 28 October 2019 by Samerhijazi (talk | contribs) (→Installation and Configuration)
Contents
- 1 Sammlung
- 2 Linux-Admin
- 3 Linux-Admin
- 4 Introduction
- 5 Basics of Kubernetes
- 6 Installation and Configuration
- 7 Kubernetes Architecture
- 8 APIs and Access
- 9 API Objects
- 10 Managing State With Deployments
- 11 Services
- 12 Volumes and Data
- 13 Ingress
- 14 Scheduling
- 15 Logging and Troubleshooting
- 16 Custom Resource Definition
- 17 Helm
- 18 Security
- 19 High Availability
Sammlung
- Installation-Tools: kubeadm
- SysReq: Master(3v CPU, 4G MeM, 5G Disk); Worker(1v CPU, 2G MeM, 5G Disk)
Linux-Admin
$ vi /etc/sudoers.d # student ALL=(ALL) ALL $ PATH=$PATH:/usr/sbin:/sbin $ tar -xvf filename
Linux-Admin
Introduction
Basics of Kubernetes
Installation and Configuration
root root $ sudo -i root $ root@lfs458-node-1a0a:~# apt-get update && apt-get upgrade -y root $ apt-get install -y docker.io root $ vim /etc/apt/sources.list.d/kubernetes.list # deb http://apt.kubernetes.io/ kubernetes-xenial main root $ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - root $ apt-get install -y kubeadm=1.15.1-00 kubelet=1.15.1-00 kubectl=1.15.1-00 root $ wget https://tinyurl.com/yb4xturm -O rbac-kdd.yaml root $ wget https://tinyurl.com/y8lvqc9g -O calico.yaml root $ ip addr show root $ vim kubeadm-config.yaml -------------------------------------- apiVersion: kubeadm.k8s.io/v1beta2 kind: ClusterConfiguration kubernetesVersion: 1.15.1 #<-- Use the word stable for newest version controlPlaneEndpoint: "k8smaster:6443" #<-- Use the node alias not the IP networking: podSubnet: 192.168.0.0/16 #<-- Match the IP range from the Calico config file -------------------------------------- root $ kubeadm init --config=kubeadm-config.yaml --upload-certs | tee kubeadm-init.out # Save output for future review root $ exit user $ mkdir -p $HOME/.kube
user $ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config user $ sudo chown $(id -u):$(id -g) $HOME/.kube/config user $ less .kube/config user $ sudo cp /root/rbac-kdd.yaml . user $ kubectl apply -f rbac-kdd.yaml user $ sudo cp /root/calico.yaml . user $ kubectl apply -f calico.yaml user $ source <(kubectl completion bash) user $ echo "source <(kubectl completion bash)" >> ~/.bashrc user $ kubectl des<Tab> n<Tab><Tab> lfs458-<Tab> user $ kubectl -n kube-s<Tab> g<Tab> po<Tab> user $ sudo kubeadm config print init-defaults