init
This commit is contained in:
53
kubernetes/manifests/nginx-proxy.yaml
Normal file
53
kubernetes/manifests/nginx-proxy.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-proxy
|
||||
namespace: devops-demo
|
||||
labels:
|
||||
app: nginx-proxy
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-proxy
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-proxy
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
- containerPort: 443
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
- name: certs
|
||||
mountPath: /etc/nginx/certs
|
||||
volumes:
|
||||
- name: config
|
||||
hostPath:
|
||||
path: /run/desktop/mnt/host/c/DevOpsProject/kubernetes/manifests/nginx/nginx.conf
|
||||
- name: certs
|
||||
hostPath:
|
||||
path: /run/desktop/mnt/host/c/DevOpsProject/kubernetes/manifests/nginx/certs
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-service
|
||||
namespace: devops-demo
|
||||
spec:
|
||||
selector:
|
||||
app: nginx-proxy
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
- protocol: TCP
|
||||
port: 443
|
||||
targetPort: 443
|
||||
type: NodePort
|
||||
Reference in New Issue
Block a user