Network
Replacing Calico with Cilium
· β˜• 2 min read
1. System Requirements Kubernetes, >= 1.16.0-0 Helm, >= 3.0 Linux kernel >= 4.9.17 For the process of upgrading the kernel on CentOS 7, see How to Switch the Data Plane to eBPF Under Calico. 2. Uninstalling Calico Delete the cluster resources 1 2 3 4 5 6 kubectl -n kube-system delete ds calico-node kubectl -n kube-system delete deploy calico-kube-controllers kubectl -n kube-system delete sa calico-node kubectl -n kube-system delete sa calico-kube-controllers kubectl -n kube-system delete cm calico-config kubectl -n kube-system delete secret calico-config 1 kubectl get crd | grep calico | awk '{print $1}' | xargs kubectl delete crd Bring down the Tunl0 interface 1 ifconfig tunl0 down Remove the Calico configuration files 1 rm -rf /etc/cni/net.

How to Switch the Data Plane to eBPF Under Calico
· β˜• 2 min read
1. Environment Preparation 1.1 Calico eBPF Requirements System requirements Ubuntu 18.04.4+ Red Hat v8.2 Linux kernel v5.3+ If Calico does not detect a compatible kernel, it falls back to standard mode. Every node needs a BPF filesystem mounted at /sys/fs/bpf Calico version no lower than 3.13 1.2 Upgrading the Kernel This uses CentOS 7:

How to Configure NetworkPolicy for NodePort in Kubernetes
· β˜• 7 min read
1. Background As shown above, the business team needs to isolate the services in a namespace, forbidding access from workloads in the bar namespace while allowing users to reach the service through a Load Balancer (LB) via NodePort. It is easy to write a network policy: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 apiVersion: networking.

Several Ways to Access GitHub from China
· β˜• 1 min read
For well-known reasons, accessing Github from a network environment in China is either blocked or very slow. This article provides several ways to get around it. 1. Download Using a Github Mirror Just prepend a Proxy address to the GitHub repository; the way different Mirrors are concatenated may vary. The

How to Get the Real Client IP in Kubernetes
· β˜• 8 min read
Kubernetes relies on the kube-proxy component to implement Service communication and load balancing. In this process, because SNAT is used to translate the source address, a service in a Pod cannot obtain the real client IP address. This article mainly answers the question of how a workload in a Kubernetes cluster can obtain the real IP address of the client.