Add ingress test
This commit is contained in:
parent
43246c258c
commit
e394fdf2d8
1 changed files with 63 additions and 0 deletions
63
generic/ingress-test.yaml
Normal file
63
generic/ingress-test.yaml
Normal file
|
@ -0,0 +1,63 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-test
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-test
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.20.0-alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-test-service
|
||||
spec:
|
||||
selector:
|
||||
app: nginx-test
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: example-ingress
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: nginx-test.info
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: nginx-test-service
|
||||
port:
|
||||
number: 80
|
||||
|
||||
|
||||
|
||||
# apiVersion: v1
|
||||
# kind: Pod
|
||||
# metadata:
|
||||
# name: echoserver
|
||||
# spec:
|
||||
# containers:
|
||||
# - name: echoserver
|
||||
# image: gcr.io/google_containers/echoserver:1.4
|
||||
# ports:
|
||||
# - containerPort: 8080
|
Loading…
Reference in a new issue