Comments (4)
This issue is currently awaiting triage.
If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from kubernetes.
Related issue.
from kubernetes.
Still have customers adopting Kubernetes and having the discussion about why logging daemonsets need user 0.
By now, is there no adopted way to do what we'd do in nix days, and add the logging agents to a admin group that can access Kubelet logs on disk -
/var/log/pods
Has this been documented and solved in the last few years? Would make a lot of folks lives easier!
Even a documented security profile that explains to k8s admins, devs and compliance departments, why theres all these tools trying to "run as root". Would definitely help ISVs as well!
Specifically talking about node level logging architectures: https://kubernetes.io/docs/concepts/cluster-administration/logging/
currently, raw logs(.log) under /var/logs/pods is generated by container runtime instead of kubelet. there is nothing kubelet can do. archive logs (.gz) is genrated by kubelet but is world-wide visible considerd as security issue. which logs do you refer to,?
# ls -rlt /var/log/pods/*/**/*
-rw-r-----. 1 root root /var/log/pods/kube-system_apiserver-demo1.test.com_712b37831be464ccc2fb1553ef89aa91/apiserver/66.log
-rw-r--r--. 1 root root /var/log/pods/kube-system_coredns-cfngt_8a5bacf2-063b-4ffc-b86a-237b94a07246/coredns/18.log.20240329-044703.gz
from kubernetes.
I am referring to /var/log/pods
. I am not personally concerned about the world readable archives.
Most logging vendor agents only read the live raw log, and yes, I understand the container engine generates them, but in service of the kubelet. Kubelet already exposes container engine settings like rotation size (which are also super low defaults in production environments k8s runs in).
The only issue we have is they are owned as root, thus we have to mess with privileged security context and running as user 0.
Some setting between kubelet and container engine should set it to some acceptable admin group like, root:adm - just using adm as an example of an admin group - then us logging vendors and k8s admins won't need to go thru security friction every single time a new user adopts k8s and runs a logging daemonset.
Its way better than the hacky ways im seeing it done now. Logging vendors shouldnt have to step on these perms out of band, or be on the hook to explain why k8s and their chosen container engines are the way they are and to solve for this.
Otherwise this should be at very least covered in the logging architecure documentation. And perhaps with guidance on a locked down security profile that everyone can jump off from that allows read only to hostpath.
Discussions have happened at the container engine level around this in the past - for example -
Would like to see some k8s leadership on this.
from kubernetes.
Related Issues (20)
- Improve the jitter value for kubelet's serviceAccountToken projected volume source HOT 1
- Readiness probe stops too early at eviction HOT 5
- Mano HOT 4
- Kubelet will only get machine info when it is started. HOT 3
- kubectl describe uses Endpoints instead of EndpointSlices HOT 5
- The Version Skew Policy does not mention aggregated apiservers HOT 5
- As of go 1.22, there's no need to use the unsafe package for string to bytes conversion HOT 6
- Provide an easy way to send graceful shutdown signal to all processes in a Windows container HOT 2
- Watch request for CRs costs about 10-15x more memory in k8s-apiserver than in-tree resource watches HOT 4
- Kubelet should not add IPv6 entries to /etc/hosts on systems where IPv6 is disabled HOT 8
- Compatibility between `k8s.io/component-base` and latest `go.opentelemetry.io/otel/exporters/prometheus`. HOT 2
- When creating two replicas in a deployment with volume mount, one pod become Error or CrashLoopBackOff stage. HOT 2
- Drop archived vendored libraries and switch to active ones HOT 6
- Topology Aware Routing not working HOT 3
- "kubectl top nodes" reports "unknown" when executing multiple concurrent “kubectl exec” requests against a pod running on a Windows node HOT 2
- kubelet should alway get lastest secret/configmap resource in pod add event HOT 4
- Pod phase transition is slower when EventedPLEG is enabled HOT 5
- Change EvaluatedNodes to count Nodes that reach Filter phase only HOT 3
- Throughput degradation scheduling daemonset pods HOT 8
- [FG:InPlacePodVerticalScaling] Add additional E2E Burstable Pod QoS test cases for pods without resource limits HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetes.