Prerequisites swap Show swap 1 free 1 sudo swapon -show Off swap 1 sudo swapoff -a Disable swap 1 sudo vi /etc/fstab 1 2 3 4 5 6 7 8 9 10 11 12 13 # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed.
Kubernetes Cluster Install Tools kubeadmin kOps Considerations Purpose Education Minikube Single node cluster with kubeadm/GCP/AWS Development & Testing Multi-Node Cluster with a Single Master and Multiple Works Setup using kubeadm tool or quick provision on GCP or AWS or AKS Hosting Production Applications High Availability Multi-Node Cluster with multiple master nodes. kubeadm or kOps on GCP or AWS or other supported platforms. Upto 5,000 nodes Upto 150,000 PODs in the cluster Upto 300,000 total containers Upto 100 PODs per node Nodes GCP Type GCP Spec AWS Type AWS Spec 1~5 n1-standard-1 1 vCPU 3.
Ingress Ingress An API object that manages external access to the services in a cluster, typically HTTP.
Ingress may provide load balancing, SSL termination and name-based virtual hosting. Ingress Layers Deploy - Ingress Controller Ingress It’s NOT deployed by default. Ingress Controller Product Description GCP HTTP(S) Load Balancer(GCE) Support Kubernetes NGINX Support Kubernetes Contour - HAPROXY - traefic - Istio - Deployment 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 apiVersion: extensions/v1beta1 kind: Deployment metadata: name: nginx-ingress-controller spec: replicas: 1 selector: matchLabels: name: nginx-ingress template: metadata: labels: name: nginx-ingress spec: containers: - name: nginx-ingress-controller image: nginx/nginx-ingress args: - /nginx-ingress-controller - --configmap=$(POD_NAMESPACE)/nginx-configuration env: - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.
CoreDNS CoreDNS CoreDNS is a DNS server.
It is written in Go.
It can be used in a multitude of environments because of its flexibility. Configuration File Location 1 kubectl -n kube-system describe deploy coredns | grep -C2 -i args 1 2 3 4 5 Ports: 53/UDP, 53/TCP, 9153/TCP Host Ports: 0/UDP, 0/TCP, 0/TCP Args: -conf /etc/coredns/Corefile Corefile Corefile CoreDNS is passing Corefile as a ConfigMap to the PODs of CoreDNS.
Cluster DNS Structure Hostname Namespace Type Root IP Address web-service apps svc cluster.local 10.107.37.188 10-244-2-5 apps pod cluster.local 10.224.2.5 10-244-1-5 default pod cluster.local 10.224.1.5 Domain IP Address web-service.apps.svc.cluster.local 10.107.37.188 10-244-2-5.apps.pod.cluster.local 10.224.2.5 10-224-1-5.default.pod.cluster.local 10.224.1.5 SVC apps web-service 10.107.37.188 1 2 3 curl http://web-service Welcome to NGINX! 1 2 3 curl http://web-service.apps.svc.cluster.local Welcome to NGINX! POD apps web 10.224.2.5 1 2 3 curl http://10-244-2-5 Welcome to NGINX! 1 2 3 curl http://10-244-2-5.apps.pod.cluster.local Welcome to NGINX!
Service Kube Proxy Mode Mode Description userspace User space iptables IP tables ipvs IPVS Check Configured Range of IP Addresses 1 2 3 4 5 # Structure kubectl -n kube-system logs <pod-name> <container-name> # Example kubectl -n kube-system logs weave-net-nz46j weave 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 DEBU: 2021/05/30 14:01:47.