Learning
How to Repair a Kubernetes Cluster After Changing IPs
· β˜• 3 min read
A record of repairing a cluster failure caused by an IP change. There are two clusters: one single-node (allinone) cluster, and one four-node cluster (3 masters, 1 node). 1. Update the Etcd Certificates [On every Etcd node] Back up the Etcd certificates 1 cp -R /etc/ssl/etcd/ssl /etc/ssl/etcd/ssl-bak View the domains

A Deep Dive into Kubernetes Network Packet Forwarding
· β˜• 22 min read
This article is translated from https://learnk8s.io/kubernetes-network-packets, not word for word, with some of my own understanding worked in. By reading this article, you can learn how packets are forwarded inside and outside Kubernetes, starting from the original web request all the way to the container hosting the application. Kubernetes Network Requirements Before diving into the details of how packets flow through a Kubernetes cluster, let’s first clarify Kubernetes’ requirements for networking.

OpenEBS Certificate Expiration Causes Service Unavailability
· β˜• 4 min read
1. Installation Method 1 2 kubectl apply -f https://openebs.github.io/charts/openebs-operator.yaml kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' OpenEBS is mainly used as the default storage for Tekton pipelines. I had also tried Longhorn before, but it could not hold up during peak hours and the pipelines went Pending. And after uninstalling Longhorn there were leftovers, which caused kube-apiserver to keep reporting errors, and in the end it took a great deal of effort to remove.

How to Make a Port Accessible Only to a Specified IP
· β˜• 1 min read
1. Host Service Ports 1 2 iptables -I INPUT -p tcp --dport 80 -j DROP iptables -I INPUT -p tcp -s 1.2.3.4 --dport 80 -j ACCEPT This allows only 1.2.3.4 to access port 80 on the local host. 2. Docker Service Ports For services started like docker run -d -p 80:80 shaowenchen/demo:whoami, the method above does not work; the rule has to be added to the DOCKER-USER chain.

Traffic Restriction Using Linux TC
· β˜• 5 min read
1. Traffic Control Principles Under Linux By queuing packets, we can control how data packets are sent. This kind of control is called data shaping (shape the data), and it includes the following operations on data: Adding latency Dropping packets Reordering Duplicating, corrupting Rate control Under the qdisc-class-filter structure, controlling traffic requires three steps: