Completed upto lesson 28
This commit is contained in:
60
lab/lesson-16-answer.yaml
Normal file
60
lab/lesson-16-answer.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: ingress-drill
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: orders-tls
|
||||
namespace: ingress-drill
|
||||
type: kubernetes.io/tls
|
||||
stringData:
|
||||
tls.crt: placeholder-certificate-for-api-validation
|
||||
tls.key: placeholder-key-for-api-validation
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: orders
|
||||
namespace: ingress-drill
|
||||
spec:
|
||||
selector:
|
||||
app: orders
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: orders
|
||||
namespace: ingress-drill
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- orders.training.local
|
||||
secretName: orders-tls
|
||||
rules:
|
||||
- host: orders.training.local
|
||||
http:
|
||||
paths:
|
||||
- path: /api
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: orders
|
||||
port:
|
||||
number: 8080
|
||||
- host: orders.training.local
|
||||
http:
|
||||
paths:
|
||||
- path: /healthz
|
||||
pathType: Exact
|
||||
backend:
|
||||
service:
|
||||
name: orders
|
||||
port:
|
||||
number: 8080
|
||||
Reference in New Issue
Block a user