Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

no iptables rules being written on host machine #267

Open
CharlesJQuarra opened this issue Nov 6, 2017 · 1 comment
Open

no iptables rules being written on host machine #267

CharlesJQuarra opened this issue Nov 6, 2017 · 1 comment

Comments

@CharlesJQuarra
Copy link

CharlesJQuarra commented Nov 6, 2017

No description provided.

@CharlesJQuarra CharlesJQuarra changed the title kube-proxy is not running on the nodes no iptables rules being written on host machine Nov 6, 2017
@CharlesJQuarra
Copy link
Author

created a test deployment in the kubernetes cluster:

kubectl run hello-world --replicas=2 --labels="run=load-balancer-example" --image=gcr.io/google-samples/node-hello:1.0 --port=8080

I create a service exposing these services:

{
  "kind": "Service",
  "apiVersion": "v1",
  "metadata": {
    "name": "example-service",
    "namespace": "default",
    "selfLink": "/api/v1/namespaces/default/services/example-service",
    "uid": "920d2302-c31c-11e7-be6d-0800276974d0",
    "resourceVersion": "194855",
    "creationTimestamp": "2017-11-06T18:01:53Z",
    "labels": {
      "pod-template-hash": "2822484588",
      "run": "load-balancer-example"
    }
  },
  "spec": {
    "ports": [
      {
        "protocol": "TCP",
        "port": 8080,
        "targetPort": 8080,
        "nodePort": 31561
      }
    ],
    "selector": {
      "pod-template-hash": "2822484588",
      "run": "load-balancer-example"
    },
    "clusterIP": "10.100.155.72",
    "type": "LoadBalancer",
    "sessionAffinity": "None",
    "externalTrafficPolicy": "Cluster"
  },
  "status": {
    "loadBalancer": {}
  }
}

The service starts:

$kubectl describe services example-service
Name:                   example-service
Namespace:              default
Labels:                 pod-template-hash=2822484588
                run=load-balancer-example
Annotations:            <none>
Selector:               pod-template-hash=2822484588,run=load-balancer-example
Type:                   LoadBalancer
IP:                     10.100.155.72
Port:                   <unset> 8080/TCP
NodePort:               <unset> 31561/TCP
Endpoints:              10.244.48.2:8080,10.244.95.2:8080
Session Affinity:       None
Events:                 <none>

If I ssh inside the vagrant VMs, I can hit the endpoints:

$curl 10.244.95.2:8080
Hello Kubernetes!

On the host, however this give a 'no route to host' error. When I inspect the iptables-save in the host, the reason is clear: no iptables being written on the host

sudo iptables-save | grep example-service
(no results)

I cannot tell if this is a bug or is simply unimplemented?

@CharlesJQuarra CharlesJQuarra reopened this Nov 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant