How do you list everything a service account can do in Kubernetes?
IntermediateProductionRapid-Fire Tool Questions
Answer
kubectl auth can-i --list --as=system:serviceaccount:payments:payments-api -n payments
kubectl auth can-i get secrets --as=system:serviceaccount:payments:payments-api -n payments
Impersonation requires impersonate rights for the person running the command.
More on Rapid-Fire Tool Questions
Gitleaks command to scan only staged changes before a commit?BeginnerTrivy command to fail a build only on fixable critical vulnerabilities?BeginnerGenerate a CycloneDX SBOM for an image with Syft and scan it with Grype?BeginnerCosign keyless verify command that pins the GitHub Actions workflow identity?IntermediateRun Checkov against a Terraform plan instead of raw HCL?BeginnerSemgrep command to scan with OWASP rules and fail on findings?Beginner