-
Notifications
You must be signed in to change notification settings - Fork 488
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
No sidecar Containers created for static pods, e.g. kube-apiserver. #2949
Comments
@Jeansen the collector CR (the first code snippet) should have mode set to |
@pavolloffay Oh, sorry. That is a typ or better copy/paste error after I had tried different settings. I updated the code accordingly. |
@frzifus can you help here? IIRC you looked at core k8s components, did you try to inject sidecar there? |
yes, I think it depends a bit on how you setup your k8s cluster. If for example your api-server and another component would run with Instead we deploy a daemonset running with Having a sperate CR could make sense. But tbh I did not think much about it. Could you provide an example of what you would like to see @Jeansen ? Kubecon tutorial [link]. FTR: |
@frzifus Well, regarding e.g. the apiserver, I'd expect it to behave the same way as any other service when using sidecars. But as I wrote, it does not with respect to static Pods. So I tried using the Deployment mode. First, it did not work either because static Pods cannot use the cluster DNS. I reached out to the Kubernetes architects and they wrote:
So, I created an ingress for the collector and with an external DNS it now works, at least for me (without sidecars). Her's what my config looks like for the apiserver:
Of course, as seen above in the comment, one could also use a specific IP of the collector service, but that's hardly what we want! And here's the Ingress manifest:
Finally, the apiserver needs to have That is my current solution on my "way to Rome". If sidecars would work, all this would not be necessary. Even more, the |
Component(s)
collector, auto-instrumentation
What happened?
Description
No sidecar Containers created for static pods, e.g. kube-apiserver.
Steps to Reproduce
Create a custom resource, with mode set to sidecar in namespace kube-system. Add relevant annotation to this namespace.
Here's my current playground CR:
And here's what my kube-system NS looks like:
Expected Result
When deleting a kube-system pod, e.g. kube-apiserver, the new Pod should have a sidecar container.
Actual Result
There is no sidecar container. BUT: If I create a simple dummy deployment in the kube-system namespace, then a sidecar container will be created.
Kubernetes Version
1.30.0
Operator version
0.56.0
Collector version
0.56.0
Environment information
Environment
Nodes run on Debian 12 as VMs (QEMU/KVM). I have 3 masters, 4 workers. Container runtime is CRI-O 1.30.0
Log output
No response
Additional context
I am following along https://kubernetes.io/docs/concepts/cluster-administration/system-traces/ but without the sidecar, I had to resort to a deployment.
The text was updated successfully, but these errors were encountered: