2.20安装online-location
pvc
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: online-location
namespace: default
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Mi
storageClassName: cdtest-storage-classservice
kind: Service
apiVersion: v1
metadata:
name: online-location-service
namespace: default
spec:
ports:
- protocol: TCP
port: 8090
targetPort: 8090
nodePort: 32720
selector:
app: online-location
type: NodePort
sessionAffinity: Nonedeployment
kind: Deployment
apiVersion: apps/v1
metadata:
name: online-location
namespace: default
labels:
app: online-location
spec:
replicas: 1
selector:
matchLabels:
app: online-location
template:
metadata:
labels:
app: online-location
spec:
volumes:
- name: online-location-volume
persistentVolumeClaim:
claimName: online-location
containers:
- name: online-location
image: registry.cn-chengdu.aliyuncs.com/liuchenyun/online-location:20230720
ports:
- containerPort: 8090
protocol: TCP
resources:
requests:
cpu: 300m
memory: 4Gi
volumeMounts:
- name: online-location-volume
mountPath: /opt/iserverOPTs
imagePullPolicy: Always
restartPolicy: Always
imagePullSecrets:
- name: dockercfg-liuchenyun