O'Reilly logo

Kubernetes for Serverless Applications by Russ McKendrick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding secrets to Kubernetes

Now that we have our Twitter application configured and all of the tokens we need to be able to post a tweet, we need to add them to Kubernetes. Kubernetes allows you to define secrets; these are variables such as API keys and tokens that your applications need to use to function. However, you might not want to put them under source control or embed them in your application because various deployments of the same code interact with the APIs using different keys—for example, the development version of the code uses a different set of API credentials from the production version.

To add the tokens you made a note of in the previous section you just need to run the following command, replacing the placeholders, which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required