3.15安装doc
service
kind: Service
apiVersion: v1
metadata:
name: doc-service
namespace: default
labels:
name: doc-service
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
nodePort: 32042
selector:
app: doc
type: NodePortdeployment
kind: Deployment
apiVersion: apps/v1
metadata:
name: online-doc
namespace: default
labels:
app: doc
spec:
replicas: 1
selector:
matchLabels:
app: doc
template:
metadata:
labels:
app: doc
spec:
containers:
- name: doc
image: registry.cn-chengdu.aliyuncs.com/liuchenyun/online-doc:latest
ports:
- containerPort: 80
protocol: TCP
resources:
requests:
cpu: 10m
memory: 10Mi
imagePullPolicy: Always
restartPolicy: Always
imagePullSecrets:
- name: dockercfg-liuchenyun