apiVersion: v1 kind: Service metadata: name: gracefulrpc namespace: kevin spec: selector: app: gracefulrpc type: ClusterIP clusterIP: None ports: - name: gracefulrpc-port port: 3456 --- apiVersion: apps/v1 kind: Deployment metadata: name: gracefulrpc-deployment namespace: kevin labels: app: gracefulrpc spec: replicas: 3 selector: matchLabels: app: gracefulrpc template: metadata: labels: app: gracefulrpc spec: containers: - name: gracefulrpc image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:v191022143425 imagePullPolicy: Always ports: - containerPort: 3456 env: - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP imagePullSecrets: - name: aliyun