apiVersion: v1 kind: Service metadata: name: sleuth-service-customer spec: type: NodePort ports: - name: server nodePort: 31007 port: 8080 targetPort: 8080 - name: management nodePort: 31008 port: 8081 targetPort: 8081 selector: app: sleuth-service-customer --- apiVersion: apps/v1 kind: Deployment metadata: name: sleuth-service-customer labels: app: sleuth-service-customer spec: replicas: 1 selector: matchLabels: app: sleuth-service-customer template: metadata: name: sleuth-service-customer labels: app: sleuth-service-customer spec: restartPolicy: Always containers: - name: sleuth-service-customer image: registry.cn-beijing.aliyuncs.com/mydlq/sleuth-service-customer:0.0.1 imagePullPolicy: IfNotPresent ports: - containerPort: 8080 name: server - containerPort: 8081 name: management resources: limits: memory: 256Mi cpu: 200m requests: memory: 256Mi cpu: 200m