IT-SDK-Kubernetes-YAML
Jump to navigation
Jump to search
Contents
- 1 Sammlung
- 2 Linux-Admin
- 3 Install kubectl
- 4 Install minikube
- 5 Introduction
- 6 Basics of Kubernetes
- 7 Installation and Configuration
- 8 Kubernetes Architecture
- 9 APIs and Access
- 10 API Objects
- 11 Managing State With Deployments
- 12 Services
- 13 Volumes and Data
- 14 Ingress
- 15 Scheduling
- 16 Logging and Troubleshooting
- 17 Custom Resource Definition
- 18 Helm
- 19 Security
- 20 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 $ export PATH="/home/sh/.minishift/cache/oc/v3.11.0/linux:$PATH" $ tar -xvf filename
Install kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl sudo install kubectl /sdk/bin
Install minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube sudo install minikube /sdk/bin
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