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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access