This commit is contained in:
47
k8s/zero-server.yaml
Normal file
47
k8s/zero-server.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: zero-server
|
||||
namespace: zero-server
|
||||
labels:
|
||||
app: zero-server
|
||||
spec:
|
||||
replicas: 3
|
||||
revisionHistoryLimit: 5
|
||||
selector:
|
||||
matchLabels:
|
||||
app: zero-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: zero-server
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: my-aliyun
|
||||
containers:
|
||||
- name: zero-server
|
||||
image: crpi-pqfsp88s5zx2zwfq.cn-hangzhou.personal.cr.aliyuncs.com/devstar/devstar_introduction:v1
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8889
|
||||
volumeMounts:
|
||||
- name: timezone
|
||||
mountPath: /etc/localtime
|
||||
volumes:
|
||||
- name: timezone
|
||||
hostPath:
|
||||
path: /usr/share/zoneinfo/Asia/Shanghai
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: zero-server-svc
|
||||
namespace: zero-server
|
||||
spec:
|
||||
ports:
|
||||
- port: 8889
|
||||
targetPort: 8889
|
||||
nodePort: 30115
|
||||
selector:
|
||||
app: zero-server
|
||||
type: NodePort
|
Reference in New Issue
Block a user