Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
Kubernetes Ingress Whitelist IP for host

How can I whitelist IP addresses for different hosts, but for the same path?

example.com - should be without whitelist. All others must be whitelisted.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: login.example.com
    http:
      paths:
      - backend:
          serviceName: login
          servicePort: 4444
        path: /
  - host: admin.example.com
    http:
      paths:
      - backend:
          serviceName: admin
          servicePort: 3333
        path: /
  - host: api.example.com
    http:
      paths:
      - backend:
          serviceName: api
          servicePort: 2222
        path: /
  - host: example.com
    http:
      paths:
      - backend:
          serviceName: wp
          servicePort: 1111
        path: /
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

annotations: nginx.ingress.kubernetes.io/whitelist-source-range: "1.1.1.1/24"

over 4 years ago · Santiago Trujillo Report

0

Basically @ANISH gave you a good idea about nginx.ingress.kubernetes.io/whitelist-source-range, where you can start.

You can specify allowed client IP source ranges through the nginx.ingress.kubernetes.io/whitelist-source-range annotation. The value is a comma separated list of CIDRs, e.g. 10.0.0.0/24,172.10.0.1.

To configure this setting globally for all Ingress rules, the whitelist-source-range value may be set in the NGINX ConfigMap.

However, if you dont want to apply it to all your ingress rules - just create 2 separate ingresses. 1 for whitelisted hosts and second for your example.com host

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!