type: RollingUpdate
template:
metadata:
labels:
app: pod-apollo-admin-server
spec:
volumes:
- name: volume-configmap-apollo-admin-server
configMap:
name: configmap-apollo-admin-server
items:
- key: application-github.properties
path: application-github.properties
containers:
- image: ip:9000/apollo/apollo-adminservice:latest #镜像地址 楼主这里使用了私人仓库
securityContext:
privileged: true
imagePullPolicy: IfNotPresent
name: container-apollo-admin-server
ports:
- protocol: TCP
containerPort: 8090
volumeMounts:
- name: volume-configmap-apollo-admin-server
mountPath: /apollo-admin-server/config/application-github.properties
subPath: application-github.properties
env:
- name: APOLLO_ADMIN_SERVICE_NAME
value: “service-apollo-admin-server.sre”
readinessProbe:
tcpSocket:
port: 8090
initialDelaySeconds: 10
periodSeconds: 5
livenessProbe:
tcpSocket:
port: 8090
initialDelaySeconds: 120
periodSeconds: 10
dnsPolicy: ClusterFirst
restartPolicy: Always
nodeName: apollo #指定的nodes节点
部署apollo-config
kind: ConfigMap
apiVersion: v1
metadata:
namespace: apollo #更改自己的namespace
name: configmap-apollo-