Skip to content

Instantly share code, notes, and snippets.

@zufardhiyaulhaq
Created June 14, 2019 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zufardhiyaulhaq/63a94c2790b749f0b4204d040b3ae21f to your computer and use it in GitHub Desktop.
Save zufardhiyaulhaq/63a94c2790b749f0b4204d040b3ae21f to your computer and use it in GitHub Desktop.
Kuryr-kubernetes error pod cannot contact service network
root@zu-kuryr-kubernetes-master:~# kubectl get pod -o wide
NAME                        READY   STATUS    RESTARTS   AGE   IP           NODE                          NOMINATED NODE   READINESS GATES
nginx-lb-6779c778bd-9hkdt   1/1     Running   0          13m   10.1.0.95    zu-kuryr-kubernetes-worker0   <none>           <none>
nginx-lb-6779c778bd-mlv94   1/1     Running   0          13m   10.1.2.14    zu-kuryr-kubernetes-worker0   <none>           <none>
nginx-lb-6779c778bd-v5bq5   1/1     Running   0          13m   10.1.1.216   zu-kuryr-kubernetes-worker0   <none>           <none>
nginx-lb-6779c778bd-wtqfg   1/1     Running   0          13m   10.1.2.157   zu-kuryr-kubernetes-worker1   <none>           <none>
nginx-lb-6779c778bd-znb7v   1/1     Running   0          13m   10.1.0.169   zu-kuryr-kubernetes-worker1   <none>           <none>

root@zu-kuryr-kubernetes-master:~# curl 10.1.0.95
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

root@zu-kuryr-kubernetes-master:~# kubectl get svc
NAME         TYPE           CLUSTER-IP    EXTERNAL-IP      PORT(S)        AGE
kubernetes   ClusterIP      10.2.0.1      <none>           443/TCP        15m
nginx-lb     LoadBalancer   10.2.122.95   10.201.201.113   80:30825/TCP   14m

root@zu-kuryr-kubernetes-master:~# curl 10.2.122.95
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

root@zu-kuryr-kubernetes-master:~# curl 10.201.201.113
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
root@zu-kuryr-kubernetes-worker1:~#  curl 10.1.0.95
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

root@zu-kuryr-kubernetes-worker1:~# curl 10.2.122.95
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

root@zu-kuryr-kubernetes-worker1:~# curl 10.201.201.113
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
root@zu-kuryr-kubernetes-master:~# kubectl run curl -it --image=tutum/curl -- sh     
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
If you don't see a command prompt, try pressing enter.

# curl 10.1.0.95
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
# curl 10.2.122.95 -vvv 
* Rebuilt URL to: 10.2.122.95/
* Hostname was NOT found in DNS cache
*   Trying 10.2.122.95...
^C
# curl 10.201.201.113 -vvv 
* Rebuilt URL to: 10.201.201.113/
* Hostname was NOT found in DNS cache
*   Trying 10.201.201.113...
^C
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.1.255.254    0.0.0.0         UG    0      0        0 eth0
10.1.0.0        0.0.0.0         255.255.0.0     U     0      0        0 eth0
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=6.63 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=5.58 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=5.58 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 5.589/5.937/6.633/0.492 ms
@zufardhiyaulhaq
Copy link
Author

zufardhiyaulhaq commented Jun 14, 2019

image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment