Last active
June 14, 2022 09:08
-
-
Save olvesh/79381e51da16a5f123b70a79edb734b4 to your computer and use it in GitHub Desktop.
Configmap with subfolders in pod
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: testconfig | |
data: | |
file1: | | |
some stuff | |
file2: | | |
some other stuff in subdir | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: cfmapcase-test-pod | |
spec: | |
restartPolicy: Never | |
containers: | |
- name: test-container | |
image: gcr.io/google_containers/busybox | |
command: [ "/bin/sh","-c","cat /etc/config/subfolder/file2" ] | |
volumeMounts: | |
- name: config-volume | |
mountPath: /etc/config | |
volumes: | |
- name: config-volume | |
configMap: | |
name: testconfig | |
items: | |
- key: file2 | |
path: ssl/file2 | |
- key: file1 | |
path: . |
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
Name: cfmapcase-test-pod | |
Namespace: default | |
Node: minikube/192.168.99.100 | |
Start Time: Thu, 11 May 2017 13:49:18 +0200 | |
Labels: <none> | |
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"cfmapcase-test-pod","namespace":"default"},"spec":{"containers":[{"command":["/bin... | |
Status: Pending | |
IP: | |
Controllers: <none> | |
Containers: | |
test-container: | |
Container ID: | |
Image: gcr.io/google_containers/busybox | |
Image ID: | |
Port: | |
Command: | |
/bin/sh | |
-c | |
cat /etc/config/subfolder/file2 | |
State: Waiting | |
Reason: ContainerCreating | |
Ready: False | |
Restart Count: 0 | |
Environment: <none> | |
Mounts: | |
/etc/config from config-volume (rw) | |
/var/run/secrets/kubernetes.io/serviceaccount from default-token-sgkc6 (ro) | |
Conditions: | |
Type Status | |
Initialized True | |
Ready False | |
PodScheduled True | |
Volumes: | |
config-volume: | |
Type: ConfigMap (a volume populated by a ConfigMap) | |
Name: testconfig | |
Optional: false | |
default-token-sgkc6: | |
Type: Secret (a volume populated by a Secret) | |
SecretName: default-token-sgkc6 | |
Optional: false | |
QoS Class: BestEffort | |
Node-Selectors: <none> | |
Tolerations: <none> | |
Events: | |
FirstSeen LastSeen Count From SubObjectPath Type Reason Message | |
--------- -------- ----- ---- ------------- -------- ------ ------- | |
13s 13s 1 default-scheduler Normal Scheduled Successfully assigned cfmapcase-test-pod to minikube | |
13s 13s 1 kubelet, minikube Warning FailedMount MountVolume.SetUp failed for volume "kubernetes.io/configmap/dd6c16d6-363f-11e7-9e87-ce943a1f2e03-config-volume" (spec.Name: "config-volume") pod "dd6c16d6-363f-11e7-9e87-ce943a1f2e03" (UID: "dd6c16d6-363f-11e7-9e87-ce943a1f2e03") with: read /var/lib/kubelet/pods/dd6c16d6-363f-11e7-9e87-ce943a1f2e03/volumes/kubernetes.io~configmap/config-volume: is a directory | |
12s 12s 1 kubelet, minikube Warning FailedMount MountVolume.SetUp failed for volume "kubernetes.io/configmap/dd6c16d6-363f-11e7-9e87-ce943a1f2e03-config-volume" (spec.Name: "config-volume") pod "dd6c16d6-363f-11e7-9e87-ce943a1f2e03" (UID: "dd6c16d6-363f-11e7-9e87-ce943a1f2e03") with: open /var/lib/kubelet/pods/dd6c16d6-363f-11e7-9e87-ce943a1f2e03/volumes/kubernetes.io~configmap/config-volume/..5985_11_05_11_49_19.847523545: is a directory | |
11s 11s 1 kubelet, minikube Warning FailedMount MountVolume.SetUp failed for volume "kubernetes.io/configmap/dd6c16d6-363f-11e7-9e87-ce943a1f2e03-config-volume" (spec.Name: "config-volume") pod "dd6c16d6-363f-11e7-9e87-ce943a1f2e03" (UID: "dd6c16d6-363f-11e7-9e87-ce943a1f2e03") with: open /var/lib/kubelet/pods/dd6c16d6-363f-11e7-9e87-ce943a1f2e03/volumes/kubernetes.io~configmap/config-volume/..5985_11_05_11_49_20.853602404: is a directory | |
9s 9s 1 kubelet, minikube Warning FailedMount MountVolume.SetUp failed for volume "kubernetes.io/configmap/dd6c16d6-363f-11e7-9e87-ce943a1f2e03-config-volume" (spec.Name: "config-volume") pod "dd6c16d6-363f-11e7-9e87-ce943a1f2e03" (UID: "dd6c16d6-363f-11e7-9e87-ce943a1f2e03") with: open /var/lib/kubelet/pods/dd6c16d6-363f-11e7-9e87-ce943a1f2e03/volumes/kubernetes.io~configmap/config-volume/..5985_11_05_11_49_22.630423325: is a directory | |
5s 5s 1 kubelet, minikube Warning FailedMount MountVolume.SetUp failed for volume "kubernetes.io/configmap/dd6c16d6-363f-11e7-9e87-ce943a1f2e03-config-volume" (spec.Name: "config-volume") pod "dd6c16d6-363f-11e7-9e87-ce943a1f2e03" (UID: "dd6c16d6-363f-11e7-9e87-ce943a1f2e03") with: open /var/lib/kubelet/pods/dd6c16d6-363f-11e7-9e87-ce943a1f2e03/volumes/kubernetes.io~configmap/config-volume/..5985_11_05_11_49_26.399256536: is a directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment