{"id":11301,"date":"2024-12-23T18:23:03","date_gmt":"2024-12-23T23:23:03","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=11301"},"modified":"2024-12-23T18:23:03","modified_gmt":"2024-12-23T23:23:03","slug":"getting-k8s-secrets","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=11301","title":{"rendered":"Getting K8s Secrets"},"content":{"rendered":"<p>A single line command to retrieve the the secrets from a namespace and decode the values:<\/p>\n<pre>k8shost:~ # kubectl get secret ca-secret -n mynamespace -o json | jq -r '.data | to_entries[] | \"\\(.key): \\(.value | @base64d)\"'\r\nACCESS_SECRET: X7aB-52p-p2y\r\nAPI_USER: PM_USER\r\nBASE_URL: https:\/\/apiserver.example.com\/api\/\r\nCOMPONENT_ID: 955_18\r\nCPU_MEM_ID: 955_17\r\nINTERFACE_ID: 955_16\r\nINVENTORY_ID: 955_5\r\nRAW_ID: 955_19<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A single line command to retrieve the the secrets from a namespace and decode the values: k8shost:~ # kubectl get secret ca-secret -n mynamespace -o json | jq -r &#8216;.data | to_entries[] | &#8220;\\(.key): \\(.value | @base64d)&#8221;&#8216; ACCESS_SECRET: X7aB-52p-p2y API_USER: PM_USER BASE_URL: https:\/\/apiserver.example.com\/api\/ COMPONENT_ID: 955_18 CPU_MEM_ID: 955_17 INTERFACE_ID: 955_16 INVENTORY_ID: 955_5 RAW_ID: 955_19<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[1542,615],"class_list":["post-11301","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-k8s","tag-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11301"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11301\/revisions"}],"predecessor-version":[{"id":11302,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11301\/revisions\/11302"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}