apiVersion: v1
kind: Pod
metadata:
name: nginxpod
labels:
name: nginxpod
spec:
containers:
- name: webservertest
image: nginx:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
protocol: TCP
- containerPort: 433
protocol: TCP
resources:
limits:
cpu: '2'
memory: 1024Mi
requests:
cpu: '1'
memory: 512Mi
livenessProbe:
httpGet:
path: /liveness
host: '0.0.0.0'
port: 8080
scheme: HTTP
httpHeaders:
- name: 'Accept'
value: 'application/json'
- name: 'Content-Type'
value: 'application/json'
periodSeconds: 5
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /readiness
host: '0.0.0.0'
port: 8080
scheme: HTTP
httpHeaders:
- name: 'Accept'
value: 'application/json'
- name: 'Content-Type'
value: 'application/json'
periodSeconds: 5
timeoutSeconds: 10
env:
- name: USER
value: JohnDoe
volumeMounts:
- name: nginx
mountPath: /etc/nginx
restartPolicy: Always
volumes:
- name: nginx
hostPath:
path: /usr/share/nginx
type: Directory