Kubernetes Handbook
  • Introduction
  • Prerequisites
    • What is Containerization
    • What is Docker
    • Difference between Docker and VM
  • Features of Kubernetes
    • What is Kubernetes
    • Features of Kubernetes - 1
    • Features of Kubernetes - 2
    • Which Tool to Use for Orchestration
  • Architecture
    • Master Node
    • etcd and kubectl
    • Worker Nodes
  • Pods and Nodes
    • Nodes
    • Pods
  • Controllers
    • Benefits of Controllers
    • Kinds of Controllers
  • Minikube
    • What is Minikube
  • Installation and Running (Mac OS)
    • Installation
    • Running Hello World Application
  • Labels Namespaces and Selectors
    • Labels
    • Namespaces
    • Selectors
  • Health Checks Rollouts and Rollbacks
    • Health Checks
    • Rollouts and Rollbacks
  • Config Maps and Secrets
    • Config Maps
    • Secrets
  • Running Jobs
    • How to Run Jobs
  • Dashboard and Debugging
    • Kubernetes Dashboard
    • Debugging
Powered by GitBook
On this page

Was this helpful?

  1. Config Maps and Secrets

Secrets

Secrets are useful for encrypting user credentials inside your pods or services.

Working with Secrets

Creating a secret

$ kubectl create secret generic apikey —from-literal=api_key=186289106

List all secrets

$ kubectl get secrets

Ouput the secret as a yaml file

$ kubectl get secret apikey -o yaml
PreviousConfig MapsNextHow to Run Jobs

Last updated 3 years ago

Was this helpful?