{"id":1085,"date":"2021-07-05T10:31:57","date_gmt":"2021-07-05T02:31:57","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=1085"},"modified":"2023-04-07T09:56:36","modified_gmt":"2023-04-07T01:56:36","slug":"kubernetes-secret-concept-configuration","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2021\/07\/kubernetes-secret-concept-configuration\/","title":{"rendered":"kubernetes Secret \u6982\u5ff5\u914d\u7f6e\u3002"},"content":{"rendered":"

Secret<\/h1>\n

Secret<\/code> \u5bf9\u8c61\u7c7b\u578b\u7528\u6765\u4fdd\u5b58\u654f\u611f\u4fe1\u606f\uff0c\u4f8b\u5982\u5bc6\u7801\u3001OAuth \u4ee4\u724c\u548c SSH \u5bc6\u94a5\u3002 \u5c06\u8fd9\u4e9b\u4fe1\u606f\u653e\u5728 secret<\/code> \u4e2d\u6bd4\u653e\u5728 Pod<\/a> \u7684\u5b9a\u4e49\u6216\u8005 \u5bb9\u5668\u955c\u50cf<\/a> \u4e2d\u6765\u8bf4\u66f4\u52a0\u5b89\u5168\u548c\u7075\u6d3b\u3002 \u53c2\u9605 Secret \u8bbe\u8ba1\u6587\u6863<\/a> \u83b7\u53d6\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n

Secret \u662f\u4e00\u79cd\u5305\u542b\u5c11\u91cf\u654f\u611f\u4fe1\u606f\u4f8b\u5982\u5bc6\u7801\u3001\u4ee4\u724c\u6216\u5bc6\u94a5\u7684\u5bf9\u8c61\u3002 \u8fd9\u6837\u7684\u4fe1\u606f\u53ef\u80fd\u4f1a\u88ab\u653e\u5728 Pod \u89c4\u7ea6\u4e2d\u6216\u8005\u955c\u50cf\u4e2d\u3002 \u7528\u6237\u53ef\u4ee5\u521b\u5efa Secret\uff0c\u540c\u65f6\u7cfb\u7edf\u4e5f\u521b\u5efa\u4e86\u4e00\u4e9b Secret\u3002<\/p>\n

\n

\u6ce8\u610f\uff1a<\/strong><\/p>\n

Kubernetes Secret \u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b58\u50a8\u4e3a base64-\u7f16\u7801\u7684\u3001\u975e\u52a0\u5bc6\u7684\u5b57\u7b26\u4e32\u3002 \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u80fd\u591f\u8bbf\u95ee API \u7684\u4efb\u4f55\u4eba\uff0c\u6216\u8005\u80fd\u591f\u8bbf\u95ee Kubernetes \u4e0b\u5c42\u6570\u636e\u5b58\u50a8\uff08etcd\uff09 \u7684\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u4ee5\u660e\u6587\u5f62\u5f0f\u8bfb\u53d6\u8fd9\u4e9b\u6570\u636e\u3002 \u4e3a\u4e86\u80fd\u591f\u5b89\u5168\u5730\u4f7f\u7528 Secret\uff0c\u6211\u4eec\u5efa\u8bae\u4f60\uff08\u81f3\u5c11\uff09\uff1a<\/p>\n

    \n
  1. \u4e3a Secret \u542f\u7528\u9759\u6001\u52a0\u5bc6<\/a>\uff1b<\/li>\n
  2. \u542f\u7528 \u6216\u914d\u7f6e RBAC \u89c4\u5219<\/a>\u6765\u9650\u5236\u5bf9 Secret \u7684\u8bfb\u5199\u64cd\u4f5c\u3002 \u8981\u6ce8\u610f\uff0c\u4efb\u4f55\u88ab\u5141\u8bb8\u521b\u5efa Pod \u7684\u4eba\u90fd\u9ed8\u8ba4\u5730\u5177\u6709\u8bfb\u53d6 Secret \u7684\u6743\u9650\u3002<\/li>\n<\/ol>\n<\/blockquote>\n

    Secret \u6982\u89c8<\/h2>\n

    \u8981\u4f7f\u7528 Secret\uff0cPod \u9700\u8981\u5f15\u7528 Secret\u3002 Pod \u53ef\u4ee5\u7528\u4e09\u79cd\u65b9\u5f0f\u4e4b\u4e00\u6765\u4f7f\u7528 Secret\uff1a<\/p>\n