github.com/looshlee/cilium@v1.6.12/examples/kubernetes-grpc/cc-door-app.yaml (about)

     1  apiVersion: apps/v1
     2  kind: Deployment
     3  metadata:
     4    labels:
     5      app: cc-door-mgr
     6      zgroup: grpcExample
     7    name: cc-door-mgr
     8  spec:
     9    replicas: 1
    10    selector:
    11      matchLabels:
    12        app: cc-door-mgr
    13    template:
    14      metadata:
    15        labels:
    16          app: cc-door-mgr
    17          zgroup: grpcExample
    18      spec:
    19        containers:
    20        - name: cc-door-mgr
    21          image: docker.io/cilium/cc-grpc-demo:v2.0
    22          imagePullPolicy: IfNotPresent
    23          command: ["python3"]
    24          args: ["/cloudcity/cc_door_server.py"]
    25          ports:
    26          - containerPort: 50051
    27            name:          grpc
    28          livenessProbe:
    29            tcpSocket:
    30              port: 50051
    31            initialDelaySeconds: 30
    32            failureThreshold: 10
    33            periodSeconds: 10
    34          readinessProbe:
    35            tcpSocket:
    36              port: 50051
    37            initialDelaySeconds: 5
    38            periodSeconds: 5
    39  ---
    40  apiVersion: v1
    41  kind: Service
    42  metadata:
    43    labels:
    44      app: cc-door-server
    45      zgroup: grpcExample
    46    name: cc-door-server
    47  spec:
    48    ports:
    49    - port: 50051
    50      protocol: TCP
    51      targetPort: 50051
    52    selector:
    53      app: cc-door-mgr
    54    sessionAffinity: None
    55    type: ClusterIP
    56  ---
    57  apiVersion: v1
    58  kind: Pod
    59  metadata:
    60    labels:
    61      app: public-terminal
    62      zgroup: grpcExample
    63    name: terminal-87
    64  spec:
    65    containers:
    66    - name: cc-door-client
    67      image: docker.io/cilium/cc-grpc-demo:v2.0
    68      imagePullPolicy: IfNotPresent
    69      command: ["sleep"]
    70      args: ["300000"]