Sensitive information storage in Kubernetes using Cloud Code for Cloud Shell

This page provides a quick introduction to what Kubernetes secrets are, and howCloud Code helps enable the Secret Manager API tocreate, use, and store them.

Introduction to Kubernetes secrets

When creating Kubernetes applications, it's often necessary to pass smallamounts of sensitive data for passwords, SSH keys, or OAuth tokens. Rather thanstore this information in a pod specification or container image, Kubernetessecrets can be created to store the sensitive data.

By default, Kubernetes secrets are stored unencrypted in the API server'sunderlying data store. Anyone with API access can retrieve or modify a secret.TheKubernetes Secrets documentationrecommends taking at least the following steps in order to safely useKubernetes secrets:

Secret Manager in Cloud Code

Cloud Code helps you use the Secret Manager API tocreate, version, and store your secrets withencryption at rest from within your IDE.You can use Secret Manager exclusively in Cloud Code, orin addition to other tools you already use for secret management.

Actions available within your IDE with Cloud Code include:

Work with Kubernetes secrets in Cloud Code

For step-by-step instructions on creating, versioning, using, and deletingsecrets in Cloud Code, seeManage secrets.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.