Kubernetes - Secrets¶
Link to all the Kubernetes Manifests¶
Step-01: Introduction¶
- Kubernetes Secrets let you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys.
- Storing confidential information in a Secret is safer and more flexible than putting it directly in a Pod definition or in a container image.
Azure Kubernetes Service with Azure DevOps and Terraform¶
Step-02: Create Secret for MySQL DB Password¶
¶
Create Kubernetes Secrets manifest¶
apiVersion: v1
kind: Secret
metadata:
name: mysql-db-password
#type: Opaque means that from kubernetes's point of view the contents of this Secret is unstructured.
#It can contain arbitrary key-value pairs.
type: Opaque
data:
# Output of echo -n 'Redhat1449' | base64
db-password: ZGJwYXNzd29yZDEx
Step-03: Update secret in MySQL Deployment for DB Password¶
Step-04: Update secret in UWA Deployment¶
- UMS means User Management Microservice
Step-05: Create & Test¶
# Create All Objects
kubectl apply -f kube-manifests/
# List Pods
kubectl get pods
# Get Public IP of Application
kubectl get svc
# Access Application
http://<External-IP-from-get-service-output>
Username: admin101
Password: password101
Step-06: Clean-Up¶
- Delete all k8s objects created as part of this section
Best Selling Azure Kubernetes Service Course on Udemy¶
Best Selling AWS EKS Kubernetes Course on Udemy¶
HashiCorp Certified Terraform Associate - 50 Practical Demos¶
🎉 New Course
Ultimate DevOps Real-World Project Implementation on AWS
$15.99
$84.99
81% OFF
DEVOPS2026FEB
Enroll Now on Udemy
🎉 Offer


