title: expose kubernetes pod to internet
body: <p>I created a pod with an api and web docker container in kuberneters using a yml file (see below).</p>
  
  <pre><code>apiVersion: v1
  kind: Pod
  metadata: 
    name: test
    labels:
      purpose: test
  spec:
    containers:
    - name: api
      image: gcr.io/test-1/api:latest
      ports:
        - containerPort: 8085
          name: http
          protocol: TCP
    - name: web
      image: gcr.io/test-1/web:latest
      ports:
        - containerPort: 5000
          name: http
          protocol: TCP
  </code></pre>
  
  <p>It show my pod is up and running</p>
  
  <pre><code>NAME       READY     STATUS    RESTARTS   AGE
  test   2/2       Running   0          5m
  </code></pre>
  
  <p>but I don't know how to expose it from here.</p>
  
  <p>it seems odd I would have to run kubectl run .... again as the pod is already running. It does not show a deployment though. </p>
  
  <p>if I try something like </p>
  
  <pre><code>kubectl expose deployment test --type="NodePort"--port 80 --target-port 5000
  </code></pre>
  
  <p>it complains about deployments.extensions "test' not found. What is the cleanest way to deploy from here?</p>