wiki/structured/assets/challenges.suse-cloud-native-fundamentals-scholarship-program/kubernetes-resources.sh
Gabriel Arazas 7c75fc2531 Update notes on the cloud computing course and Nix
Was able to finally pass through the ArgoCD installation among other
things. I also updated more exercises to tangle my solutions into a file.
2021-07-04 11:55:02 +08:00

15 lines
562 B
Bash
Executable File

#!/usr/bin/env bash
# Create the namespace with the specified label.
kubectl create namespaces demo
kubectl label namespaces demo tier=test
# Create the specified deployment.
kubectl create deployment nginx-alpine --image=nginx:alpine --replicas=3 --namespace=demo
kubectl label deployment nginx-alpine app=nginx tag=alpine --namespace=demo
# Expose the deployment as a service.
kubectl expose deployment nginx-alpine --namespace=demo --port=8111
# Create the config map.
kubectl create configmaps nginx-version --namespace=demo --from-literal=version=alpine