apiVersion: v1
kind: Service
metadata:
  labels:
    app: uci
  name: uci
spec:
  ports:
  - port: 9393 
    name: http
    protocol: TCP
    targetPort: 9393
  selector:
    app: uci
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: uci
  name: uci
spec:
  replicas: 1
  selector:
    matchLabels:
      app: uci
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: uci
    spec:
      containers:
      - image: registry.baidubce.com/serving_dev/fit_a_line:security
        name: uci
        imagePullPolicy: Always
        ports:
        - containerPort: 9393
        workingDir: /home/fit_a_line/
        name: uci
        command: ['/bin/bash', '-c']
        args: ["python3.6 -m paddle_serving_server.serve --model uci_housing_model --thread 10 --port 9393 --name uci"] 
        env:
          - name: SERVING_BIN
            value: "/usr/local/serving_bin/serving"
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_IP
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
        resources: {}
