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