how if i want do the same thing on secret?
- User
how if i want do the same thing on secret?
Assistant
kubectl get secrets -A -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{" "}{.data}{"\n"}{end}' | grep -i db_host | awk '{print $1, $2}'Note that secret data is base64 encoded, so if you want to search the actual decoded values, you'd need a more complex approach:
kubectl get secrets -A -o json | jq -r '.items[] | select(.data | to_entries[] | .value | @base64d | test("db_host"; "i")) | "\(.metadata.namespace) \(.metadata.name)"'The second command uses
jqto decode the base64 values and search within them.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.