Regarding your questions, here was the output when it was not working
Anyway thanks for your help !
Name: drupal-774b56cfd6-tpmjd
Namespace: default
Priority: 0
PriorityClassName:
Node: node01/172.17.0.49
Start Time: Sun, 17 May 2020 12:03:18 +0000
Labels: app=drupal
pod-template-hash=3306127982
Annotations:
Status: Running
IP: 10.32.0.2
Controlled By: ReplicaSet/drupal-774b56cfd6
Init Containers:
init-sites-volume:
Container ID: docker://6e49fe90dd538c7d52a5db11c312fd6b1f6a685c25d6634cd61e5d1affa8725b
Image: drupal:8.6
Image ID: docker-pullable://drupal@sha256:6b33b1f96b13aab3c4280fa8362a6fb32194b2656191b5c9b85f2cb014a8d942
Port:
Host Port:
Command:
/bin/bash
-c
Args:
cp -r /var/www/html/sites/ /data/ && chown -R www-data:www-data /data/
State: Terminated
Reason: Completed
Exit Code: 0
Started: Sun, 17 May 2020 12:03:41 +0000
Finished: Sun, 17 May 2020 12:03:41 +0000
Ready: True
Restart Count: 0
Environment:
Mounts:
/data from pvc (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-gm9wt (ro)
Containers:
drupal:
Container ID: docker://24d3dfa9d71a5a7893ed9cd390f0fb08d7c822afdc33376ef2d9f2bb7e9b0c60
Image: drupal:8.6
Image ID: docker-pullable://drupal@sha256:6b33b1f96b13aab3c4280fa8362a6fb32194b2656191b5c9b85f2cb014a8d942
Port:
Host Port:
State: Running
Started: Sun, 17 May 2020 12:03:42 +0000
Ready: True
Restart Count: 0
Environment:
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-gm9wt (ro)
/var/www/html/modules from pvc (rw)
/var/www/html/profiles from pvc (rw)
/var/www/html/sites from pvc (rw)
/var/www/html/themes from pvc (rw)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
pvc:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: drupal-pvc
ReadOnly: false
default-token-gm9wt:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-gm9wt
Optional: false
QoS Class: BestEffort
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
Normal Scheduled 5m default-scheduler Successfully assigned default/drupal-774b56cfd6-tpmjd to node01
Normal Pulling 5m kubelet, node01 pulling image “drupal:8.6”
Normal Pulled 4m kubelet, node01 Successfully pulled image “drupal:8.6”
Normal Created 4m kubelet, node01 Created container
Normal Started 4m kubelet, node01 Started container
Normal Pulled 4m kubelet, node01 Container image “drupal:8.6” already present on machine
Normal Created 4m kubelet, node01 Created container
Normal Started 4m kubelet, node01 Started container