Difference between revisions of "IT-SDK-Kubernetes-YAML"
Jump to navigation
Jump to search
Samerhijazi (talk | contribs) (→Installation and Configuration) |
(→Linux-Admin) |
||
| Line 9: | Line 9: | ||
$ PATH=$PATH:/usr/sbin:/sbin | $ PATH=$PATH:/usr/sbin:/sbin | ||
$ tar -xvf filename | $ tar -xvf filename | ||
| + | </pre> | ||
| + | |||
| + | == Install kubectl == | ||
| + | <pre class="code"> | ||
| + | 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 | ||
| + | </pre> | ||
| + | |||
| + | == Install minikube == | ||
| + | <pre class="code"> | ||
| + | curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube | ||
| + | sudo install minikube /sdk/bin | ||
</pre> | </pre> | ||
Revision as of 15:02, 3 November 2019
Contents
- 1 Sammlung
- 2 Linux-Admin
- 3 Install kubectl
- 4 Install minikube
- 5 Linux-Admin
- 6 Introduction
- 7 Basics of Kubernetes
- 8 Installation and Configuration
- 9 Kubernetes Architecture
- 10 APIs and Access
- 11 API Objects
- 12 Managing State With Deployments
- 13 Services
- 14 Volumes and Data
- 15 Ingress
- 16 Scheduling
- 17 Logging and Troubleshooting
- 18 Custom Resource Definition
- 19 Helm
- 20 Security
- 21 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
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
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