<p>I'm new to kubernetes and not sure what prerequisite I'm missing in order to make it work.</p>

<p>I ran the following command</p>

<pre><code>kubectl create -f k8s-pod.yml 
</code></pre>

<p>and the response is</p>

<blockquote>
  <p>The connection to the server localhost:8080 was refused - did you
  specify the right host or port?</p>
</blockquote>

<p><strong>k8s-pod.yml</strong></p>

<pre><code>apiVersion: v1
kind: Pod

metadata:
  name: app
  labels:
    language: go
    env: test

spec:
  containers:
    - name: app
      image: app:1.0.8
      ports:
        - containerPort: 8080
          protocol: TCP
</code></pre>

Developer
<p>can you check if you can connect to kubernetes cluster using the below command</p>

<pre><code>kubectl get cs

</code></pre>

<p>if you get an error that means you cant connect to kubernetes api server. check your kubernetes setup</p>
