apiVersion: apps/v1 kind: Deployment metadata: name: client-deployment namespace: hsv2 spec: replicas: %d selector: matchLabels: app: client template: metadata: labels: app: client spec: topologySpreadConstraints: - maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: app: client containers: - name: client image: hub.yizhisec.com/hybridscope/client_server:latest imagePullPolicy: IfNotPresent volumeMounts: - name: ssl-pub-crt mountPath: /etc/yizhisec/license/pub_key subPath: pub_key readOnly: true - name: config-volume mountPath: /etc/client_server/config.yml subPath: config.yml readOnly: true volumes: - name: ssl-pub-crt configMap: name: ssl-pub-crt items: - key: pub_key path: pub_key - name: config-volume configMap: name: config-client items: - key: config.yml path: config.yml --- apiVersion: v1 kind: Service metadata: name: client-service namespace: hsv2 spec: selector: app: client ports: - protocol: TCP name: web port: 9129 targetPort: 9129 - protocol: TCP name: web2 port: 9024 targetPort: 9024 - protocol: TCP name: web-message port: 9025 targetPort: 9025 type: ClusterIP