podsecrets
Flask app demonstrating Kubernetes secrets with color-coded backgrounds for status.
282
Certainly! Here's the updated Docker Hub description with instructions to run the pod devopscoderio/podsecrets:
Welcome to the Kubernetes Secrets Demo Application! This Docker image is designed to demonstrate the use of Kubernetes secrets through a simple Flask web application. The application dynamically changes background colours based on the availability of specific secrets, making it easy to visualise whether the secrets are correctly mounted in the Kubernetes pods.
USERNAME and PASSWORD secrets are mounted.USERNAME or PASSWORD secrets is mounted.USERNAME nor PASSWORD secrets are mounted.Create Kubernetes Secrets:
kubectl create secret generic my-secret --from-literal=username=my-app --from-literal=password=s3cr3t
Deploy to Kubernetes:
Deploy with secrets:
kubectl apply -f deployment-with-secret.yaml
Deploy without secrets:
kubectl apply -f deployment-without-secret.yaml
Create services:
kubectl apply -f service.yaml
Run the Pod:
kubectl run podsecrets --image=devopscoderio/podsecrets --restart=Never
Access the Application:
Check pod status:
kubectl get pods
Port-forward to access services locally:
kubectl port-forward svc/secret-demo-service 8080:80
kubectl port-forward svc/secret-demo-no-secret-service 8081:80
Access services:
http://localhost:8080/http://localhost:8081/USERNAME and PASSWORD are mounted.USERNAME or PASSWORD is mounted.USERNAME nor PASSWORD is mounted.Content type
Image
Digest
sha256:5e8be34bd…
Size
44.8 MB
Last updated
about 2 years ago
docker pull devopscoderio/podsecrets