File tree Expand file tree Collapse file tree 4 files changed +45
-10
lines changed Expand file tree Collapse file tree 4 files changed +45
-10
lines changed Original file line number Diff line number Diff line change
1
+ # Lab 12
2
+
3
+ ## ConfigMap file
4
+
5
+ ``` sh
6
+ $ helm install app-py . -f secrets://./env-secrets.yaml
7
+ NAME: app-py
8
+ LAST DEPLOYED: Mon Apr 22 16:55:16 2024
9
+ NAMESPACE: default
10
+ STATUS: deployed
11
+ REVISION: 1
12
+ NOTES:
13
+ 1. Get the application URL by running these commands:
14
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
15
+ You can watch the status of by running ' kubectl get --namespace default svc -w app-py'
16
+ export SERVICE_IP=$( kubectl get svc --namespace default app-py --template " {{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}" )
17
+ echo http://$SERVICE_IP :5000
18
+ $ kubectl wait deployment/app-py --for condition=available
19
+ deployment.apps/app-py condition met
20
+ $ kubectl get po
21
+ NAME READY STATUS RESTARTS AGE
22
+ app-py-7d7d86657c-df667 1/1 Running 0 30s
23
+ app-py-7d7d86657c-hq8nw 1/1 Running 0 30s
24
+ app-py-7d7d86657c-jxgrj 1/1 Running 0 30s
25
+ app-py-7d7d86657c-twd5l 1/1 Running 0 30s
26
+ $ kubectl exec app-py-7d7d86657c-twd5l -- cat /persistent/config.json
27
+ {" mole" : [" hamsters" ], " hamster" : [" moles" ]}
28
+ $
29
+ ```
Original file line number Diff line number Diff line change
1
+ {"mole" : [" hamsters" ], "hamster" : [" moles" ]}
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ConfigMap
3
+ metadata :
4
+ name : {{ .Release.Name }}-config-map
5
+ data :
6
+ config.json : {{ .Files.Get "files/config.json" | quote }}
Original file line number Diff line number Diff line change 4
4
repository : kolay0ne/app_py
5
5
pullPolicy : IfNotPresent
6
6
# Overrides the image tag whose default is the chart appVersion.
7
- tag : " lab8 "
7
+ tag : " lab12 "
8
8
9
9
serviceAccount :
10
10
# Specifies whether a service account should be created
@@ -84,17 +84,16 @@ autoscaling:
84
84
# targetMemoryUtilizationPercentage: 80
85
85
86
86
# Additional volumes on the output Deployment definition.
87
- volumes : []
88
- # - name: foo
89
- # secret:
90
- # secretName: mysecret
91
- # optional: false
87
+ volumes :
88
+ - name : config-map
89
+ configMap :
90
+ name : app-py-config-map
92
91
93
92
# Additional volumeMounts on the output Deployment definition.
94
- volumeMounts : []
95
- # - name: foo
96
- # mountPath: "/etc/foo "
97
- # readOnly: true
93
+ volumeMounts :
94
+ - name : config-map
95
+ mountPath : " /persistent "
96
+ readOnly : true
98
97
99
98
nodeSelector : {}
100
99
You can’t perform that action at this time.
0 commit comments