Prereq:
- Install Kind
- Install Docker
Steps:
- kind create cluster (create a cluster with one control-plane)
- kubectl cluster-info --context kind-kind (set context)
- kubectl apply -f mongo-secret.yaml
- kubectl apply -f mongo-configmap.yaml
- kubectl apply -f mongo.yaml
- kubectl apply -f mongo-express.yaml
- kubectl port-forward svc/mongo-express-service 30000:8081
Deployment file a MongoDb database and service leveraging secrets
Command Description kubectl apply -f mongo.yaml create
Deployment file a MongoDb database and service leveraging secrets and values from configMap.
Command Description kubectl apply -f mongo-express.yaml create kubectl port-forward svc/mongo-express-service 30000:8081 forward traffic to internal port
Secrets have to be create before they can be referenced
Command Description echo -n 'my-password' | base64 create base64 string kubectl apply -f mongo-secret.yaml create
Configs have to be create before they can be referenced
Command Description kubectl apply -f mongo-configmap.yaml create
Command Description kublectl get service list all of the services kublectl get pod list all pods kublectl get service list all services kubectl get secret gets secret info kubectl apply -f creates and updates resources in a cluster kubectl get all list all info about the cluster kubectl cluster-info get cluster info kind create cluster create a new cluser, default name will be 'kind' kind delete cluster delete a cluser, default name will be 'kind' echo -n 'my-password' | base64 create a base64 string