Description of ResourceQuota object on K8s

Description of the ResourceQuota resource object and its role in the cluster Definition description https://kubernetes.io/zh-cn/docs/concepts/policy/resource-quotas/ Division and design of resource groups in the cluster In a cluster with 32 GiB of memory and 16-core CPU resources, Team A is allowed to use 20 GiB of memory and 10-core CPU resources, Team B is allowed to […]

7.3 Deploy Spring Cloud application on k8s

Article directory 1. Packaging projects 2. Build the image 2.1 Build image 2.2 Build jdk image 2.3 Build eureka image 2.4 Build item-service image 2.5 Build user-service image 2.6 Build order-service image 2.7 Export the image and import it to other servers 3. Deployment 3.1 Deploy eureka 3.2 Deploy rs, rs will automatically create a […]

kubeadm installs k8s high availability cluster

Table of Contents 1. Environmental planning: 2. Things to note: 3. Environment preparation: 1. Turn off firewall rules, turn off selinux, and turn off swap: 2. Modify the host name: 3. A node modifies the hosts file: 4. Time synchronization of all nodes: 5. All nodes implement Linux resource limits: 6. Upgrade the kernel on […]

kubernetes cluster orchestration – k8s scheduling

nodename vim nodename.yaml apiVersion: v1 Kind: Pod metadata: name: nginx labels: app: nginx spec: containers: – name: nginx image: nginx nodeName: k8s2 nodeName: k8s2 #If the node pod cannot be found, pending will appear, with the highest priority. kubectl apply -f nodename.yaml kubectl get pod -o wide Recycle kubectl delete -f nodename.yaml nodeselector vim nodeselector.yaml […]

kubernetes cluster orchestration – k8s storage (volumes, persistent volumes, statefulset controller)

volumes emptyDir volume vim emptydir.yaml apiVersion: v1 Kind: Pod metadata: name: vol1 spec: containers: – image: busyboxplus name: vm1 command: [“sleep”, “300”] volumeMounts: – mountPath: /cache name: cache-volume – name: vm2 image: nginx volumeMounts: – mountPath: /usr/share/nginx/html name: cache-volume volumes: – name: cache-volume emptyDir: medium: Memory sizeLimit: 100Mi kubectl apply -f emptydir.yaml kubectl get pod […]

k8s—–data storage

Table of Contents 1. The concept of data storage 2. Basic storage 1. EmptyDir storage volume 2. hostPath storage volume 3. nfs shared storage volume 3. Advanced storage 1. PV (persistent volume) 2. PVC (persistent volume statement) 3. Static PV experiment 4. Dynamic PV experiment 4.1 Install nfs on the stor01 node and configure the […]

10. ConfigMap of K8S

ConfigMap 1. Concept In K8S, ConfigMap is an API object used to store configuration data. It is generally used to store some configuration information or environment variables required by applications in Pods. Separate the configuration from the Pod to avoid having to rebuild the image and container due to modification of the configuration. 2. Create […]

k8s builds MySQL master-slave synchronization

env k8s: v1.28.2 mysql: v8.0.34 Build nfs server 1. Execute the installation commands on 3 machines respectively yum install -y nfs-utils 2. Create 3 directories on the master node and write them to /etc/exports mkdir -p /data/nfs/{<!– –>mysql-master,mysql-slaver-01,mysql-slaver-01} cat >> /etc/exports << EOF /data/nfs/mysql-master *(rw,sync,no_root_squash) /data/nfs/mysql-slaver-01 *(rw,sync,no_root_squash) /data/nfs/mysql-slaver-02 *(rw,sync,no_root_squash) 3. Start the nfs server systemctl […]

Implementing mysql master and backup in k8s

Article directory 1. Implementation of mysql master and backup in k8s 1.1 Environmental information 1.2 Deploy nfs-provisioner 1.2.1 Install nfs 1.2.2 Deploy nfs-provisioner 1.3 Install mysql 1.4 Check whether synchronization occurs on the standby database 1. Implementation of mysql master and backup in k8s 1.1 Environmental information Machine Operating system ip mysql version k8s version […]

Level 6 K8s Overcoming Strategy (3) – Service Health Check

——> Course videos are shared simultaneously on Toutiao and Bilibili Health Check Hello everyone, I am Boge AiOperation and Maintenance. Observe the 2023 Kubernetes Practical Strategy column. Here we go one step further and talk about the health detection features of services on K8s. On K8s, the powerful self-healing capability is a very important feature […]