feat: Add nginx-nodeport example with comprehensive documentation and security comparison
This commit is contained in:
54
examples/nginx-nodeport/nginx-nodeport-deployment.yaml
Normal file
54
examples/nginx-nodeport/nginx-nodeport-deployment.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-nodeport
|
||||
labels:
|
||||
app: nginx-nodeport
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-nodeport
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-nodeport
|
||||
spec:
|
||||
hostNetwork: false
|
||||
dnsPolicy: ClusterFirst
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: html-content
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "200m"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
volumes:
|
||||
- name: html-content
|
||||
configMap:
|
||||
name: nginx-nodeport-content
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: nginx-nodeport-nginx-config
|
||||
Reference in New Issue
Block a user