123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- labels:
- app: py-grpc-example
- version: v1
- name: py-grpc-example
- namespace: prd
- spec:
- type: ClusterIP
- ports:
- - name: grpc-greet
- port: 50051
- protocol: TCP
- targetPort: 50051
- selector:
- app: py-grpc-example
- version: v1
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: py-grpc-example
- namespace: prd
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: py-grpc-example
- version: v1
- template:
- metadata:
- labels:
- app: py-grpc-example
- version: v1
- spec:
- containers:
- - name: py-grpc-example
- image: ccr.ccs.tencentyun.com/wanpinghui/py-example-server:1582956676
- ports:
- - name: grpc-api
- protocol: TCP
- containerPort: 50051
- imagePullSecrets:
- - name: qcloudregistrykey
- - name: tencenthubkey
- restartPolicy: Always
|