@@ -37,7 +37,7 @@ kubectl version --client
37
37
```
38
38
# Make sure you are in root directory 'ToDoFehrist'
39
39
docker build -t todofehrist:v1 .
40
- docker -- login # Login for dockerhub.io
40
+ docker login # Login for dockerhub.io
41
41
docker push todofehrist:v1
42
42
```
43
43
@@ -85,16 +85,30 @@ PGDATABASE=$(kubectl get secrets -n postgres-operator "${PG_CLUSTER_USER_SECRET_
85
85
86
86
psql -h localhost -p 5432 -U hippo
87
87
# use PGPASSWORD for authentication
88
+ #Show Databases
89
+ \l
90
+ # Connect to Database
91
+ \c hippo
92
+ # Show Tables
93
+ \dt
88
94
89
95
kubectl get pods -n postgres-operator
90
96
```
91
97
98
+ ## Create Env ConfigMap
99
+ ```
100
+ kubectl -n postgres-operator create configmap todofehristapi-dev-env-cm --from-env-file=dev.env
101
+ kubectl -n postgres-operator get configmap todofehristapi-dev-env-cm -o yaml
102
+ # OR update the existing
103
+ kubectl -n postgres-operator apply -f todofehristapi-dev-env-cm.yaml
104
+ ```
105
+
92
106
## ToDoFehristAPI Deployment - Service - Ingress
93
107
```
94
108
# Create APIs Deployment - Service and Ingress
95
- kubectl apply -f todofehristapi-deployment.yaml
96
- kubectl apply -f todofehristapi-service.yaml
97
- kubectl apply -f todofehrist-ingress.yaml
109
+ kubectl -n postgres-operator apply -f todofehristapi-deployment.yaml
110
+ kubectl -n postgres-operator apply -f todofehristapi-service.yaml
111
+ kubectl -n postgres-operator apply -f todofehrist-ingress.yaml
98
112
99
113
# Get Minikube Cluster IP
100
114
minikube ip
@@ -116,11 +130,13 @@ minikube tunnel
116
130
# to test a service locally in minikube
117
131
minikube service todofehristapi-service --url
118
132
119
- kubectl get namespaces
120
- kubectl get pods # to get deployments
121
- kubectl get services
122
- kubectl get ingress
133
+ kubectl -n postgres-operator get namespaces
134
+ kubectl -n postgres-operator get pods # to get deployments
135
+ kubectl -n postgres-operator get services
136
+ kubectl -n postgres-operator get ingress
123
137
124
138
# forward port from a pod
125
139
kubectl -n default port-forward "<POD_NAME>" 8000:8000
140
+ # Restart a deployment
141
+ kubectl -n postgres-operator rollout restart deployment todofehristapi-deployment
126
142
```
0 commit comments