apiVersion: apps/v1
kind: Deployment
metadata:
  name: image-classifier-resnet50
  labels:
    app: image-classifier
    version: resnet50
spec:
  replicas: 2
  selector:
    matchLabels:
      app: image-classifier
      version: resnet50
  template:
    metadata:
      labels:
        app: image-classifier
        version: resnet50
    spec:
      containers:
      - name: tf-serving
        image: "tensorflow/serving"
        args: 
        - "--model_name=resnet50"
        - "--model_base_path=gs://clean-pen-305004-bucket/resnet_50"
        imagePullPolicy: IfNotPresent
        readinessProbe:
          tcpSocket:
            port: 8500
          initialDelaySeconds: 10
          periodSeconds: 5
          failureThreshold: 10
        ports:
        - name: http
          containerPort: 8501
          protocol: TCP
        - name: grpc
          containerPort: 8500
          protocol: TCP