New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pod unable to connect to itself via service #61593
Comments
/sig network |
https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/#a-pod-cannot-reach-itself-via-service-ip |
I somehow did not find this after two days of looking. Anyway I will give
it a shot and update in the next few hours.
Also want to bring to notice that this is happening on fresh clusters on
GKE with the defaults. Is this expected behaviour?
…On Sat, Mar 24, 2018, 1:26 PM foxyriver ***@***.***> wrote:
https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/#a-pod-cannot-reach-itself-via-service-ip
<http://url>
kubelet has solved this by setting --hairpin-mode. or you can execute ifconfig
docker0 promisc by hand to open promisc mode of docker0 network.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61593 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAenDPZyM8s3tdDhXYlh41PHCHLekyC1ks5thfw0gaJpZM4S4kTz>
.
|
Doing
Note the lack of hairpin mode in the flags. running
@foxyriver do you know how to go about changing these flags on GKE? I am also discussing the same with GCP support... |
running |
@codebreach According to the startup parameter of kubelet, you installed Kubernetes network by cin plugin. Then you should execute |
sorry, I didn't use GKE. :) |
@foxyriver unfortunately seems to not work:
Output of
|
@codebreach whether there is a interface named |
I figured it out! By default network policy is disable on GKE. To fix it
just enable network policy.
Here's the relevant part from the thread-> Since no CNI Plugins are
specified in the kubelet command line, k8s defaults to a minimal behavior -
NoopNetworkPlugin which sets the net/bridge/bridge-nf-call-iptables to 1 -
and the --hairpin-mode flag gets dropped. This was not the case in 1.5.
Looks like this is broken since 1.6 release for setups not using any
network plugin. So, with the last kubernetes versions the "--hairpin-mode"
flag should be configure.
/Close
…On Tue, Mar 27, 2018, 06:23 foxyriver ***@***.***> wrote:
@codebreach <https://github.com/codebreach> whether there is a network
named kubenet in your host or not?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61593 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAenDOfnRTQ-gEKjxRjPICPy2qgrRtHeks5tiY2UgaJpZM4S4kTz>
.
|
/kind bug
What happened:
Unable to route network requests from pod to self via service
What you expected to happen:
Network requests should work
How to reproduce it (as minimally and precisely as possible):
Environment:
kubectl version
): 1.9.4-gke.1 (also with 1.7.12-gke.1)Long story:
I have a pod P1 running on node N1 and a ClusterIP service S1 pointing to P1
I have a pod P2 running on node N1 trying to access service S1 (http://s1.default.svc.cluster.local) - this timesout
I have another pod P3 running on node N2 trying to access service S1 (same url) - this works
P2 continuously io timeouts, while P3 works fine. As a workaround I have used nodeSelector to make sure P1 is never run with P2 on the same node as a workaround.
Now I have a situation where P1 needs to access itself using S1. So pod 1 which has service 1 pointing to it has to access service 1.
Already looked at a LOT of github issues and SO and it seems i need to set hairpin mode or install CNI flannel. But it seems that these are only relevant for custom (kubeadm) deployments. I am running on GKE and can't change these...so any ideas?
The text was updated successfully, but these errors were encountered: