Using Secrets in Services

Our services often need to use secrets. Things like database credentials and 3rd party API keys cannot be put inside a docker image right?

Space Cloud provides the ability to describe such secrets and inject them in containers in runtime.

Advantage of using Secretslink

  • All secrets are made available to the containers at runtime.
  • Changing secrets redeploys all services using it automatically.
  • Makes the container images for flexible to use in different environments.
  • You can create the secret once and use it in multiple services.

How to works?link

There are two types of secrets.

  • Environment variables: This creates the provided environment variables in the services using it.
  • File Secrets: This creates the provided files at a specific location in the services using it.

Here’s how you create the two secrets:

Create env secret

Create file secret

To apply these secrets to a service, mention them in the service configuration.

Using secrets

Have a technical question?

Improve the docs!