Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add egress CRD #218

Merged
merged 8 commits into from
Dec 26, 2024
Merged

add egress CRD #218

merged 8 commits into from
Dec 26, 2024

Conversation

backguynn
Copy link
Collaborator

Description based on K8s
To use Egress, you must first create the following LoadBalancer service.

apiVersion: v1
kind: Service
metadata:
  name: loxilb-egress-service
  namespace: kube-system
  annotations:
    loxilb.io/usepodnetwork: "yes"
spec:
  externalTrafficPolicy: Local
  type: LoadBalancer
  loadBalancerClass: loxilb.io/loxilb
  selector:
    app: loxilb-app
  ports:
  - name: loxilb-ha
    port: 2020
    targetPort: 8080
    protocol: TCP

And apply the egress CRD to K8s.

kubectl apply -f https://raw.githubusercontent.com/loxilb-io/kube-loxilb/refs/heads/main/manifest/crds/egress-crd.yaml

An example yaml file for creating egress is as follows.

apiVersion: "egress.loxilb.io/v1"
kind: Egress
metadata:
  name: test-egress
spec:
  #address: IP list of the Pod on which you want the egress rule applied
  addresses:        
  - 10.42.1.2/32
  - 10.42.0.5/32
  #vip: IP in addresses is SNATed to the corresponding VIP.
  vip: 172.18.0.254

@TrekkieCoder TrekkieCoder merged commit 240b417 into loxilb-io:main Dec 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants