Skip to content

eProxy is a lightweight and efficient replacement for kube-proxy in Kubernetes environments, leveraging eBPF (Extended Berkeley Packet Filter) technology for enhanced performance and flexibility.

Notifications You must be signed in to change notification settings

K-Huntun/eproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eproxy

eProxy is a lightweight and efficient replacement for kube-proxy in Kubernetes environments, leveraging eBPF (Extended Berkeley Packet Filter) technology for enhanced performance and flexibility.

How to deploy

git clone https://github.com/K-Huntun/eproxy.git
cd eproxy/deploy
kubectl apply -f deploy.yaml

How to use

kubectl create ns nginx kubectl apply -f svc.yaml

apiVersion: v1
kind: Service
metadata:
  labels:
    service.kubernetes.io/service-proxy-name: eproxy
  name: nginx-bpf
  namespace: nginx
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: nginx
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: nginx
  name: nginx-deploy
  namespace: nginx
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx
        ports:
        - containerPort: 80
        name: nginx
kubectl exec -it <other-pod> bash
curl nginx-bpf:8080

卸载

Due to the fact that eproxy mounts the BTF file internally within the container, when eproxy is unmounted or when the container is killed for other reasons, both the eBPF program and map data of eproxy will disappear. Upon container restart, they will be reloaded again.

kubectl delete -f deploy.yaml

How to build

docker build -it --rm -v ${eproxy_home}:/root/eproxy registry.cn-hangzhou.aliyuncs.com/secrity/eproxy_build:0.0.1 bash
cd /root/eproxy
make clean all

About

eProxy is a lightweight and efficient replacement for kube-proxy in Kubernetes environments, leveraging eBPF (Extended Berkeley Packet Filter) technology for enhanced performance and flexibility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published