Files
IKT210-kubernetes-cluster/manifests/nginx/base/deploy.yaml
2026-07-26 09:35:26 +02:00

51 lines
872 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
name: http
volumeMounts:
- mountPath: /etc/nginx/conf.d
name: nginx-config
- mountPath: /usr/share/nginx/html
name: nginx-html
volumes:
- configMap:
name: nginx-config
name: nginx-config
- configMap:
name: nginx-html
name: nginx-html
---
apiVersion: v1
kind: Service
metadata:
labels:
app: nginx
name: nginx
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
type: ClusterIP