Difference between revisions of "IT-SDK-Kubernetes-YAML"
Jump to navigation
Jump to search
(→Linux-Admin) |
|||
| Line 23: | Line 23: | ||
sudo install minikube /sdk/bin | sudo install minikube /sdk/bin | ||
</pre> | </pre> | ||
| − | + | == Schulung == | |
| − | == Introduction == | + | === Introduction === |
| − | == Basics of Kubernetes == | + | === Basics of Kubernetes === |
| − | == Installation and Configuration == | + | === Installation and Configuration === |
<pre class="code"> | <pre class="code"> | ||
root root $ sudo -i | root root $ sudo -i | ||
| Line 65: | Line 65: | ||
</pre> | </pre> | ||
| − | == Kubernetes Architecture == | + | === Kubernetes Architecture === |
| − | == APIs and Access == | + | === APIs and Access === |
| − | == API Objects == | + | === API Objects === |
| − | == Managing State With Deployments == | + | === Managing State With Deployments === |
| − | == Services == | + | === Services === |
| − | == Volumes and Data == | + | === Volumes and Data === |
| − | == Ingress == | + | === Ingress === |
| − | == Scheduling == | + | === Scheduling === |
| − | == Logging and Troubleshooting == | + | === Logging and Troubleshooting === |
| − | == Custom Resource Definition == | + | === Custom Resource Definition === |
| − | == Helm == | + | === Helm === |
| − | == Security == | + | === Security === |
| − | == High Availability == | + | === High Availability === |
Revision as of 14:24, 14 November 2019
Contents
- 1 Sammlung
- 2 Linux-Admin
- 3 Install kubectl
- 4 Install minikube
- 5 Schulung
- 5.1 Introduction
- 5.2 Basics of Kubernetes
- 5.3 Installation and Configuration
- 5.4 Kubernetes Architecture
- 5.5 APIs and Access
- 5.6 API Objects
- 5.7 Managing State With Deployments
- 5.8 Services
- 5.9 Volumes and Data
- 5.10 Ingress
- 5.11 Scheduling
- 5.12 Logging and Troubleshooting
- 5.13 Custom Resource Definition
- 5.14 Helm
- 5.15 Security
- 5.16 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
Schulung
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