This repository contains code samples and commands used in the YouTube video tutorial on managing secrets in Kubernetes. In the video, we cover creating and managing different types of secrets, including generic, Docker-registry, and TLS secrets.
kubectl create secret generic db-secret --from-literal=username=dbuser --from-literal=password=Y4nys7f11
kubectl create secret docker-registry docker-secret [email protected] --docker-username=dev --docker-password=pass1234 --docker-server=my-registry.example:5000
kubectl create secret tls my-tls-secret --cert=/root/data/serverca.crt --key=/root/data/servercakey.pem
kubectl apply -f <file-name.yaml>
kubectl get pods
kubectl get secret
kubectl describe secret <secret-name>
kubectl exec -it <pod-name> -- printenv
kubectl exec -it <pod-name> -- bash
kubectl get pod <pod-name> -o yaml
echo "<data>" | base64 -d
Kubernetes secrets are an important aspect of managing Kubernetes applications. They allow you to store sensitive data securely and manage access to that data. By using the commands and code samples in this repository, you'll be able to easily create, use, and manage secrets in your Kubernetes applications.