forked from inno-devops-labs/S24-core-course-labs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Lab 12 | ||
|
||
## ConfigMap file | ||
|
||
```sh | ||
$ helm install app-py . -f secrets://./env-secrets.yaml | ||
NAME: app-py | ||
LAST DEPLOYED: Mon Apr 22 16:55:16 2024 | ||
NAMESPACE: default | ||
STATUS: deployed | ||
REVISION: 1 | ||
NOTES: | ||
1. Get the application URL by running these commands: | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get --namespace default svc -w app-py' | ||
export SERVICE_IP=$(kubectl get svc --namespace default app-py --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") | ||
echo http://$SERVICE_IP:5000 | ||
$ kubectl wait deployment/app-py --for condition=available | ||
deployment.apps/app-py condition met | ||
$ kubectl get po | ||
NAME READY STATUS RESTARTS AGE | ||
app-py-7d7d86657c-df667 1/1 Running 0 30s | ||
app-py-7d7d86657c-hq8nw 1/1 Running 0 30s | ||
app-py-7d7d86657c-jxgrj 1/1 Running 0 30s | ||
app-py-7d7d86657c-twd5l 1/1 Running 0 30s | ||
$ kubectl exec app-py-7d7d86657c-twd5l -- cat /persistent/config.json | ||
{"mole": ["hamsters"], "hamster": ["moles"]} | ||
$ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"mole": ["hamsters"], "hamster": ["moles"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-config-map | ||
data: | ||
config.json: {{ .Files.Get "files/config.json" | quote }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters