このページの情報の一部またはすべては、S3NS の Trusted Cloud には適用されない場合があります。
Cloud Code for VS Code を使用した Kubernetes での機密情報の保存
このページでは、Kubernetes Secret の概要と、Cloud Code で Secret Manager API を使用して Secret を作成、使用、保存する方法について説明します。
Kubernetes Secret の概要
Kubernetes アプリケーションを作成する際は、多くの場合、パスワード、SSH 認証鍵、OAuth トークン用の少量のセンシティブ データを渡す必要があります。この情報を Pod の仕様やコンテナ イメージに保存するのではなく、Kubernetes Secret を作成してセンシティブ データを保存できます。
デフォルトでは、Kubernetes Secret は暗号化されずに API サーバーの基盤となるデータストアに保存されます。API アクセス権を持つすべてのユーザーが Secret を取得または変更できます。Kubernetes Secret のドキュメントでは、Kubernetes Secret を安全に使用するために、少なくとも次の手順を実施することを推奨しています。
Cloud Code の Secret Manager
Cloud Code は、Secret Manager API を使用して、IDE 内から、保存時の暗号化で Secret を作成、バージョニング、保存できるようにします。Secret Manager は、Cloud Code でのみ、またはシークレット管理にすでに使用している他のツールに加えて使用できます。
Cloud Code を使用して IDE 内で使用できるアクションは次のとおりです。
Cloud Code を使用して Kubernetes Secret を操作する
Cloud Code を使用してシークレットの作成、バージョニング、使用、削除を行う際の手順ガイドについては、シークレットを管理するをご覧ください。
次のステップ
サポートを利用する
フィードバックを送信するには、
GitHub で問題を報告します。または、
Stack Overflow で質問します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-17 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-02-17 UTC。"],[[["\u003cp\u003eKubernetes secrets are used to store sensitive data like passwords and tokens, rather than storing them directly in pod specifications or container images.\u003c/p\u003e\n"],["\u003cp\u003eBy default, Kubernetes secrets are stored unencrypted, so it is recommended to enable encryption at rest, configure RBAC rules, and consider external secret store providers.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code enables users to leverage the Secret Manager API to create, version, and securely store secrets with encryption at rest directly from within the IDE.\u003c/p\u003e\n"],["\u003cp\u003eWith Cloud Code, you can enable the Secret Manager API, create and manage Kubernetes secrets, add them as environment variables, and mount them as volumes.\u003c/p\u003e\n"],["\u003cp\u003eThe Kubernetes Documentation provides further insight into the good practices and alternatives to secrets, such as service account tokens.\u003c/p\u003e\n"]]],[],null,[]]