-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
in-cluster: Name does not resolve #1071
Comments
This is a combination of #153 + the fact that the dns workaround we had in place is no longer default (because it's not a recommended Kubernetes way to do things). See #1003 Using the |
I tried with: let cfg = if let Ok(c) =
kube::config::Config::from_kubeconfig(&kube::config::KubeConfigOptions::default()).await
{
c
} else {
kube::config::Config::incluster_dns().expect("Failed to load kube config")
}; But it didn't work (same error). However running with the openssl stack seems to work: kube = { version = "0.76.0", features=["openssl-tls", "runtime", "client"], default-features = false}
k8s-openapi = { version = "0.16.0", features = ["v1_25"] } BUT, weirdly, when I check the logs I get this first:
There seems to be a panic, but shortly after it resumes and I get proper access. Weird. Anyway, it looks like it works now! |
You on istio? Rust apps tend to boot faster than istio so the first connection attempt tends to fail until the sidecar has established the connection routing. |
Yes. That must be it then! Thanks again for your help. |
Current and expected behavior
When running in-cluster, it looks like my client can't resolve the name of the api. Locally, everything runs fine but here are the logs when I'm running in-cluster:
I did see these issues:
kubernetes.default.svc
in-cluster when usinghostNetwork
#953But none of the workarounds or solutions mentioned there could help solve my problem.
What I have tried:
I tried patching the deployment of my service with this:
Like it's mentioned there: #953 (comment)
I also tried setting the env var
KUBERNETES_SERVICE_HOST = kubernetes.default.svc
like it's mentioned here: #587 (comment), even though it was a bit useless since this workaround was merged.I also tried to build and run without rustls-tls, but then I got different error messages (EDIT: see below for why this happens. I probably jumped the gun, it was probably working):
Would you have any idea about what's going on?
Possible solution
No response
Additional context
No response
Environment
Client Version: v1.21.14
Server Version: v1.21.14-eks-6d3986b
Configuration and features
Affected crates
No response
Would you like to work on fixing this bug?
No response
The text was updated successfully, but these errors were encountered: