kubernetes cluster orchestration – k8s storage (configmap, secrets)

configmap Literal value creation kubectl create configmap my-config –from-literal=key1=config1 –from-literal=key2=config2 kubectl get cm kubectl describe cm my-config Create from file kubectl create configmap my-config-2 –from-file=/etc/resolv.conf kubectl describe cm my-config-2 Create from directory mkdir test cp /etc/passwd test/ cp /etc/fstab test/ ls test/ kubectl create configmap my-config-3 –from-file=test kubectl describe cm my-config-3 Created through yaml file […]

Kubernetes resource management-declarative

Introduction to yaml and json Yuml language introduction YAML is a markup language similar to XML and JSON. It emphasizes data as the center and does not focus on markup language. The definition of YAML itself is relatively simple. Known as “a humanized data format language”. The syntax of YAML is relatively simple, mainly including […]

Kubernetes nginx-ingress component

Just run the following yaml file apiVersion: v1 kind: Namespace metadata: name: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx — kind: ConfigMap apiVersion: v1 metadata: name: nginx-configuration namespace: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx — kind: ConfigMap apiVersion: v1 metadata: name: tcp-services namespace: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx — kind: ConfigMap apiVersion: v1 metadata: name: […]

Kubernetes-network plugin

Table of Contents 1. flannel network plug-in 2. calico network plug-in 1. Deployment 2. Network strategy (1) Limit pod traffic (2) Limit namespace traffic (3) Limit namespace and pod at the same time (4) Limit external traffic to the cluster 1. flannel network plug-in Flannel is a Kubernetes network plug-in that provides network communication capabilities […]

kubernetes-controller

Table of Contents 1. replicaset 2. Deployment 1. Version iteration 2. Rollback 3. Rolling update strategy 4. Pause and resume 3. daemonset 4. stateful set 5. job 6. cronjob 一、replicaset ReplicaSet is used to ensure that a specified number of Pod replicas are always running. vim rs-example.yml apiVersion: apps/v1 kind: ReplicaSet metadata: name: replicaset-example spec: […]

kubernetes cluster deployment

1. Cluster deployment method Method 1. minikube Minikube is a tool that can quickly run a single point of Kubernetes locally, for users trying Kubernetes or daily development. Not for use in production environments. ? Official address: https://kubernetes.io/docs/setup/minikube/ Method 2. kubeadm Kubeadm is also a tool that provides kubeadm init and kubeadm join for rapid […]

Kubernetes yaml file

Table of Contents yaml file Detailed explanation of Pod yaml file Detailed explanation of deployment.yaml file Detailed explanation of Service yaml file Documents Kubernetes supports YAML and JSON formats to manage resource objects JSON format: mainly used for message transmission between API interfaces YAML format: used for configuration and management. YAML is a concise, non-markup […]

kubernetes-ingress-nginx

Table of Contents 1. Deployment 2. Visit 1. Path-based access 2.Access based on domain name 3. Encryption and Authentication 1.TLS encryption 2.auth authentication 4. rewrite redirection 5. canary release 1. Based on header grayscale 2. Based on weight grayscale 3. Split business domains 1. Deployment ingress-nginx is an open source Kubernetes Ingress controller for routing […]

Kubernetes resource management-declarative

Introduction to resource management Resource management concepts In kubernetes, all content is abstracted into resources, and users need to manage kubernetes by operating resources. The essence of kubernetes is a cluster system. Users can deploy various services in the cluster. The starting point is to run each container in the kubernetes cluster and run the […]

kubernetes-servicemicroservice

Table of Contents 1. service microservice 2. IPvs mode 3. ClusterIP 1.ClusterIP 2.headless 4. NodePort 1.NodePort 2.Default port 5. LoadBalancer 1.LoadBalancer 2.metallb 6.ExternalName 1. service microservice Kubernetes Service microservice is a Kubernetes-based microservice architecture that achieves high scalability, elasticity, and maintainability by splitting services into multiple small service units. Each service unit has its own […]