60 lines
1.1 KiB
YAML
60 lines
1.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nginx
|
|
namespace: default
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: nginx
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: nginx
|
|
app: nginx
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:1.25.2-alpine
|
|
ports:
|
|
- containerPort: 8080
|
|
# securityContext:
|
|
# allowPrivilegeEscalation: false
|
|
# capabilities:
|
|
# drop:
|
|
# - ALL
|
|
# runAsNonRoot: true
|
|
# seccompProfile:
|
|
# type: RuntimeDefault
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: nginx
|
|
namespace: default
|
|
spec:
|
|
selector:
|
|
app: nginx
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8080
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: nginx-ingress
|
|
namespace: default
|
|
spec:
|
|
rules:
|
|
- host: test.talos.loc
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: nginx
|
|
port:
|
|
number: 80
|