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
dns lookup error to kubernetes.default.svc
in-cluster when using hostNetwork
#953
Comments
may be not support daemonset? |
There's nothing special about daemonsets from our POV. It should work. The error you are getting is actually from just failing to communicate with the cluster:
rustls should work in-cluster, so it should not be that (although you could try openssl instead), your daemonset selectors are a bit weird (app vs name, and traffic-billing vs ftraffic-billing) but also should not be relevant. just ruling out something about the cluster, you have the default kubernetes service, right? |
I have corrected it but still wrong
BTW, i am use deployment. which work for me!!! |
oh, interesting. if it works with a I double-checked in controller-rs by changing the deployment to a daemonset: diff --git yaml/deployment.yaml yaml/deployment.yaml
index 236a9b0..f002457 100644
--- yaml/deployment.yaml
+++ yaml/deployment.yaml
@@ -61,14 +61,14 @@ spec:
---
# Main deployment
apiVersion: apps/v1
-kind: Deployment
+kind: DaemonSet
metadata:
name: doc-controller
namespace: default
labels:
app: doc-controller
spec:
- replicas: 1
+ #replicas: 1
selector:
matchLabels:
app: doc-controller
@@ -83,7 +83,7 @@ spec:
serviceAccountName: doc-controller
containers:
- name: doc-controller
- image: clux/controller:otel
+ image: clux/controller:latest
imagePullPolicy: Always
resources:
limits: and that controller worked perfectly. you could try that one to check a system that works, but otherwise not really sure why it's failing for you 🤔 |
There's one key thing you didn't notice, that you didn't turn on |
Wow. That's new; indeed it does not work with
Now, I'm not sure if that's a problem or not. Maybe you have to talk to the apiserver with the old method when it's using host-networking? I don't see any immediately similar bugs in kubernetes org but i didn't look very hard. Will update the title of this bug to more correctly reflect the situation. Thanks for the report. Glad you got it working :-) |
kubernetes.default.svc
in-cluster when using hostNetwork
Maybe you need https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy Try adding that under |
Ahh, nice find. Yes that does indeed fix it! Working diff in --- yaml/deployment.yaml
+++ yaml/deployment.yaml
@@ -81,9 +81,11 @@ spec:
prometheus.io/port: "8080"
spec:
serviceAccountName: doc-controller
+ hostNetwork: true
+ dnsPolicy: ClusterFirstWithHostNet
containers:
- name: doc-controller
- image: clux/controller:otel
+ image: clux/controller:latest
imagePullPolicy: Always
resources:
limits: Going to close this as invalid as its not a bug on our end. |
Current and expected behavior
Daemonset
rbac
source code
Possible solution
No response
Additional context
No response
Environment
➜ kubectl version --short
Client Version: v1.23.6
Server Version: v1.20.7
WARNING: version difference between client (1.23) and server (1.20) exceeds the supported minor version skew of +/-1
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: