kubectl-whoami
kubectl-whoami copied to clipboard
add output format option for json output
Hi, thanks for creating this useful tool. I wanted to add this functionality that returns the output the status response of the tokenreview as json.
Is this something you would consider merging?
if this is something you need, we can consider merging it. could you please ensure it is backward compatible by default?
if this is something you need, we can consider merging it. could you please ensure it is backward compatible by default?
Would really appreciate that. This change should be backwards comparable by default.
To use this new feature, you would have to run kubectl whoami -ojson
, where you then get the output of tokenreview
{
"authenticated": true,
"user": {
"username": "user",
"uid": "uid",
"groups": [
"system:authenticated"
],
},
"audiences": [
"https://kubernetes.default.svc"
]
}