title: Enable remote acess to kubernetes pod on local installation
body: <p>I'm also trying to expose a mysql server instance on a local kubernetes installation(1 master and one node, both on oracle linux) but I not being able to access to the pod.</p>
  
  <p>The pod configuration is this:</p>
  
  <pre><code>apiVersion: v1
  kind: Pod
  metadata:
    name: mysql
    labels:
      name: mysql
  spec:
    containers:
      - resources:
          limits :
            cpu: 1
        image: docker.io/mariadb
        name: mysql
        env:
          - name: MYSQL_ROOT_PASSWORD
            value: 123456
        ports:
          - containerPort: 3306
            name: mysql
  </code></pre>
  
  <p>And the service file:</p>
  
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    labels:
      name: mysql
    name: mysql
  spec:
    type: NodePort 
    ports:
     - port: 3306
        targetPort: 3306
        nodePort: 30306
    selector:
      name: mysql
  </code></pre>
  
  <p>I can see that the pod is is running:</p>
  
  <pre><code># kubectl get pod mysql
  NAME      READY     STATUS    RESTARTS   AGE
  mysql     1/1       Running   0          3d
  </code></pre>
  
  <p>And the service is connected to an endpoint:</p>
  
  <pre><code># kubectl describe service mysql
  Name:           mysql
  Namespace:      default
  Labels:         name=mysql
  Selector:       name=mysql
  Type:           NodePort
  IP:         10.254.200.20
  Port:           &lt;unset&gt; 3306/TCP
  NodePort:       &lt;unset&gt; 30306/TCP
  Endpoints:      11.0.14.2:3306
  Session Affinity:   None
  No events.
  </code></pre>
  
  <p>I can see on netstat that kube-proxy is listening on port 30306 for all incoming connections.</p>
  
  <pre><code>tcp6       6      0 :::30306                :::*                    LISTEN      53039/kube-proxy
  </code></pre>
  
  <p>But somehow I don't get a response from mysql even on the localhost.</p>
  
  <pre><code># telnet localhost 30306
  Trying ::1...
  Connected to localhost.
  Escape character is '^]'.
  </code></pre>
  
  <p>Whereas a normal mysql installation responds with something of the following:</p>
  
  <pre><code>$ telnet [REDACTED] 3306
  Trying [REDACTED]...
  Connected to [REDACTED].
  Escape character is '^]'.
  N
  [REDACTED]-log�gw&amp;TS(gS�X]G/Q,(#uIJwmysql_native_password^]
  </code></pre>
  
  <p>Notice the mysql part in the last line.</p>
  
  <p>On a final note there is this kubectl output:</p>
  
  <pre><code>$ kubectl get service
  NAME         CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
  kubernetes   10.254.0.1      &lt;none&gt;        443/TCP    9d
  mysql        10.254.200.20   nodes         3306/TCP   1h
  </code></pre>
  
  <p>But I don't understand what "nodes" mean in the EXTERNAL-IP column.</p>
  
  <p>So what I want to happen is to open the access to the mysql service through the master IP(preferrably). How do I do that and what am I doing wrong?</p>