一、yaml文件示例
apiVersion: v1
kind: Pod
metadata:
labels:
app: nginx
name: nginx
namespace: mtactor
spec:
containers:
- name: nginx
image: nginx:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 250m
memory: 512Mi
startupProbe:
httpGet:
path: /aliyun.html
port: 80
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /aliyun.html
port: 80
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /aliyun.html
port: 80
scheme: HTTP
initialDelaySeconds: 30