apiVersion: apps/v1 kind: Deployment metadata: name: gcp-emulator-deployment namespace: test-namespace # Replace with the actual namespace labels: app: pubsub spec: selector: matchLabels: app: pubsub template: metadata: labels: app: pubsub spec: containers: - name: pubsub-emulator image: "//hack/deps:gcloud_container_push" command: ["gcloud", "beta", "emulators", "pubsub", "start"] args: ["--project=abc", "--host-port=0.0.0.0:8085"] readinessProbe: tcpSocket: port: 8085 initialDelaySeconds: 1 periodSeconds: 5 --- apiVersion: v1 kind: Service metadata: name: pubsub-service namespace: test-namespace # Replace with the actual namespace spec: ports: - protocol: TCP port: 8085 targetPort: 8085 selector: app: pubsub