Comments (8)
Looks like in later versions situation become even worse. I want my teams to be able to read logs this way:
kail -n personal-namespace -l 'app=proxy'
I already gave cluster scope permission to read namespaces, but, I think, since last version of kail it also want to read pods at cluster scope and the command above doesn't work anymore. It produces error like:
$ kail -n personal-namespace -l 'app=proxy'
ERRO[0000] client list: pods is forbidden: User "system:serviceaccount:default:superhero" cannot list resource "pods" in API group "" at the cluster scope cmp=lister
Even tho user have permissions to read namespaces and to read pods in specified namespace.
I was able to reproduce the same error using command
kubectl get pod --all-namespaces
I think in latest versions kail was switched to this behaviour and it broke our usual workflow. Now I have to give people clusterscope permission to read all pods in my cluster and that is not something what I to do by any chance.
from kail.
Yeah it does not push down all of the constraints (you might add another --ns
flag, for instance). Also, you can select for things which haven't been created yet - it needs to be able to listen for new resources.
That said, namespace might be a special case - it probably isn't necessary to list/watch namespaces since the ns name is in all of the objects. If this ends up being a big problem I can address it.
Try using this to prevent the namespace list:
./kail --context=dev --svc=ns1/projector
from kail.
@slawo let me know if the workaround solves the issue. Thanks for the report!
from kail.
This is an issue for me as well:
❱ kail --pod=mah-pod --ns=my-namespace
ERRO[0000] client list: pods is forbidden: User "..." cannot list pods at the cluster scope cmp=lister
ERRO[0000] lister error: client list: pods is forbidden: User "..." cannot list pods at the cluster scope cmp=controller
kail: error: Unable to initialize data source
from kail.
Hey @wsargent. Long time no see! Hope you're doing well.
Did you try the workaround I posted?
kail --pod=my-namespace/mah-pod
from kail.
Oh hi Adam!
Same deal with namespace/mah-pod -- "cannot list pods at the cluster scope cmp=lister" and the same error with "cmp=controller"
from kail.
Thanks @wsargent! I'll take a look at this when I can.
from kail.
Same problem here when using Kail on an Openshift cluster :
kail: error: Can't connnect to kubernetes: namespaces is forbidden: User "stduser" cannot list namespaces at the cluster scope: User "stduser" cannot list all namespaces in the cluster
from kail.
Related Issues (20)
- Feature request: --follow=false HOT 2
- Advantages over stern?
- Support regular expression or auto completion?
- Release? DNS on macOS with VPNs doesn't work HOT 1
- not able to get logs of two pods
- Running Kail without cluster role
- Feature: ARM64 builds HOT 11
- Add support proxy-url from config
- Homebrew: Calling `bottle :unneeded` is deprecated HOT 3
- Become a Krew extension HOT 3
- arm64 support in krew HOT 6
- Allow not printing prefix HOT 1
- Release of sts support HOT 1
- Plans for a Windows binary? HOT 8
- RBAC HOT 1
- missing example of ignore HOT 1
- Access issue in release github action, failing to update homebrew-repo kail.rb
- brew error: SHA256 mismatch HOT 4
- Update link for `minikube` HOT 1
- Feature request: automatically reconnect 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 kail.