<p>I have a minimal (working) <strong>presto</strong> installation (one coordinator and a worker on the same host) that I want to expand. I've created a container with a worker node and it works when deployed via docker (IE shows up in presto CLI).</p>
<blockquote>
<p>select * from system.runtime.nodes;</p>
</blockquote>
<p>When I move said container my k8 cluster and create a few pods it seems that the pods can contact the coordinator but they never show up in the CLI. The logs for the pods show that they have discovered the coordinator and there aren't any error msgs in the coordinator logs so Im puzzled as to where the disconnect is.</p>
<h3>deployment.yaml</h3>
<pre><code>apiVersion: apps/v1 
kind: Deployment
metadata:
  name: presto-worker
spec:
  type: NodePort
  selector:
    matchLabels:
      app: presto-worker
  replicas: 2 
  template:
    metadata:
      labels:
        app: presto-worker
    spec:
      containers:
      - name: presto-image
        image: docker.io/mystuff/presto-image:latest
        ports:
        - containerPort: 8080
</code></pre>

ethrbunny
<p>It looks like you've combined parts of a Deployment and a Service; they're two different objects.  You can break this up:</p>

<pre><code>---
apiVersion: apps/v1 
kind: Deployment
metadata:
  name: presto-worker
spec:
  selector:
    matchLabels:
      app: presto-worker
  replicas: 2 
  template:
    metadata:
      labels:
        app: presto-worker
    spec:
      containers:
      - name: presto-image
        image: docker.io/mystuff/presto-image:latest
        ports:
        - containerPort: 8080
---
apiVersion: v1 
kind: Service
metadata:
  name: presto-worker
spec:
  type: NodePort
  selector:
    matchLabels:
      app: presto-worker
  ports:
  - name: http
    port: 8080
</code></pre>

<p>The Service selector points at specific pods; it needs to match the deployment spec's pod template labels.  The Deployment selector names the pods that the Deployment manages.  In both cases they point at pods but they're for different purposes.</p>
