This commit is contained in:
C菌
2021-04-15 22:08:12 +08:00
commit f506f64266
10 changed files with 264 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: helloworld
spec:
replicas: 2
selector:
matchLabels:
app: helloworld
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: helloworld
spec:
containers:
- name: helloworld
image: mirrors2/helloworld:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
# livenessProbe:
# httpGet:
# path: /
# port: 80
# initialDelaySeconds: 5
# timeoutSeconds: 10
# readinessProbe:
# httpGet:
# path: /
# port: 80
# initialDelaySeconds: 5
# timeoutSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: helloworld
namespace: default
spec:
selector:
app: helloworld
type: NodePort
ports:
- port: 80
targetPort: 80
protocol: TCP
nodePort: 30000