mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 06:44:07 -06:00
28 lines
564 B
Markdown
28 lines
564 B
Markdown
|
|
Mounting configmaps is super useful. I've used it to mount scripts for execution within containers.
|
|
|
|
```yaml
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: configmap-pod
|
|
spec:
|
|
containers:
|
|
- name: test
|
|
image: busybox:1.28
|
|
command: ['sh', '-c', 'echo "The app is running!" && tail -f /dev/null']
|
|
volumeMounts:
|
|
- name: config-vol
|
|
mountPath: /etc/config
|
|
volumes:
|
|
- name: config-vol
|
|
configMap:
|
|
name: log-config
|
|
items:
|
|
- key: log_level
|
|
path: log_level
|
|
```
|
|
|
|
## Links:
|
|
|
|
202403300534 |