Created
August 27, 2023 07:21
-
-
Save ioxorg/2a1ea7c76cb1029300e5fd5a2a667406 to your computer and use it in GitHub Desktop.
Ingress AllowAccess ip ranges
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx | |
labels: | |
app: nginx | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:alpine | |
ports: | |
- name: nginx | |
containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx | |
spec: | |
type: ClusterIP | |
selector: | |
app: nginx | |
ports: | |
- name: nginx | |
protocol: TCP | |
port: 80 | |
targetPort: 80 | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: nginx | |
annotations: | |
nginx.ingress.kubernetes.io/whitelist-source-range: x.x.x.x/x # specific range or ips | |
spec: | |
rules: | |
- host: x.com | |
http: | |
paths: | |
- backend: | |
service: | |
name: nginx | |
port: | |
number: 80 | |
path: / | |
pathType: ImplementationSpecific |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment