Create configmap-pod.yaml

This commit is contained in:
Sabbir Ahmed Shameem 2024-05-07 19:13:31 +06:00 committed by GitHub
parent d4f68d3cb2
commit 5c6fbc4d05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: example-config
data:
example.property.1: hello
example.property.2: world
---
apiVersion: v1
kind: Pod
metadata:
name: configmap-pod
spec:
containers:
- name: configmap-redis
image: redis:3.0-nanoserver
env:
- name: EXAMPLE_PROPERTY_1
valueFrom:
configMapKeyRef:
name: example-config
key: example.property.1
- name: EXAMPLE_PROPERTY_2
valueFrom:
configMapKeyRef:
name: example-config
key: example.property.2
nodeSelector:
kubernetes.io/os: windows