Replies: 1 comment 4 replies
-
Looks like some Which version is your K8s cluster? This doesn't seem to be possible to reproduce with |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all. I will freely admit I am still relatively new to the Rust ecosystem, and best described as a k8s "user" rather than power user or administrator, so please excuse any wild incompetence.
I built a small rust programme that retrieves oauth tokens for me from specific services in different environments, all of which are hosted on remote k8s clusters. Up until now, I've had to occasionally retrieve specific k8s secrets, and have done so by shelling out to kubectl and piping through jq. I generally don't like this kind of approach when more powerful integration is possible, however, hence my exploration of this project.
Whilst I have found querying for for pods and configmaps to be straightforward, querying for Secrets does not seems to work. Where a simple command line like
kubectl -n my-namespace get secrets
successfully returns a list of secrets,
What I think is the equivalent rust code:
returns
I had to accept invalid certs for any of the queries to work, as the dev environment is not using an up to date cert.
My gut tells me that getting secrets requires an elevated level of access that is somehow transparent to the command line, but somehow I am not negotiating the protocol correctly in code.
Any ideas? Help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions