Closed rsaim closed 1 year ago
This is created. The dev version is deployed to http://159.122.183.157:31001
Steps:
vscode@nyu:/app$ cat deploy/dev/namespace.yaml ; echo
apiVersion: v1
kind: Namespace
metadata:
name: dev
labels:
name: dev
vscode@nyu:/app$ kc apply -f deploy/dev/namespace.yaml
namespace/dev created
Applying the name namespace.yaml
is idempotent i.e., has no effect until the namespace.yaml file is changed.
vscode@nyu:/app$ kc apply -f deploy/dev/namespace.yaml
namespace/dev unchanged
From IBM dashboard:
Pulled secrets from default namespace:
vscode@nyu:/app$ kubectl -n default get secret all-icr-io -o yaml | sed 's/default/dev/g' | kubectl -n dev apply -f -
secret/all-icr-io created
vscode@nyu:/app$ kc -n dev get all
No resources found in dev namespace.
vscode@nyu:/app$ make deploy-dev
Deploying to dev namespace...
kubectl -n dev apply -f deploy/dev/namespace.yaml
namespace/dev created
kubectl -n default get secret all-icr-io -o yaml | sed 's/default/dev/g' | kubectl -n dev apply -f -
secret/all-icr-io created
kubectl -n dev apply -f deploy/dev
deployment.apps/wishlist created
namespace/dev unchanged
statefulset.apps/postgres created
service/postgres created
secret/postgres-creds created
service/wishlist created
vscode@nyu:/app$ kc -n dev get all
NAME READY STATUS RESTARTS AGE
pod/postgres-0 1/1 Running 0 75s
pod/wishlist-5c54dd8f6-b595g 1/1 Running 0 76s
pod/wishlist-5c54dd8f6-xzn5b 1/1 Running 0 76s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/postgres ClusterIP 172.21.46.224 <none> 5432/TCP 75s
service/wishlist NodePort 172.21.92.3 <none> 8080:31001/TCP 74s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/wishlist 2/2 2 2 77s
NAME DESIRED CURRENT READY AGE
replicaset.apps/wishlist-5c54dd8f6 2 2 2 77s
NAME READY AGE
statefulset.apps/postgres 1/1 76s
vscode@nyu:/app$ wget -q -O - http://159.122.183.157:31001 | jq -r ".description"
A RESTful wishlist microservice for ECommerce application
As a Developer I need a namespace called "dev" in Kubernetes cluster So that I can deploy the development version of the service online
Assumptions
This is a Kubernetes namespace, not a Contrainer Registry namespace Acceptance Criteria:
Given the dev namespace Then I can deploy my development version of the service to the dev namespace