Following instructions to create wordpress-mysql statefulset. The only difference from the instruction is that I created persistentvolume with NFS. I can see the persistentvolumeclaim successfully bound to the persistentvolumes. But 'describe pod' shows CrashLoopBackOff. The following is the console output:
Name: wordpress-mysql-1894417608-vljsm
Namespace: default
Node: rh4/8.0.0.8
Start Time: Thu, 27 Jul 2017 14:59:02 +0000
Labels: app=wordpress
pod-template-hash=1894417608
tier=mysql
Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"wordpress-mysql-1894417608","uid":"2071b96d-72dc-11e7-aafb-001dd...
Status: Running
IP: 10.233.109.6
Controllers: ReplicaSet/wordpress-mysql-1894417608
Containers:
mysql:
Container ID: docker://586fb71c34351a58504629aa59457620c418273bb8e00751f02e9095bdf7ae45
Image: mysql:5.6
Image ID: docker-pullable://mysql@sha256:2897982d4c086b03586a1423d0cbf33688960ef7534b7bb51b9bcfdb6c3597e7
Port: 3306/TCP
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Thu, 27 Jul 2017 15:25:23 +0000
Finished: Thu, 27 Jul 2017 15:25:24 +0000
Ready: False
Restart Count: 10
Environment:
MYSQL_ROOT_PASSWORD: <set to the key 'password.txt' in secret 'mysql-pass'> Optional: false
Mounts:
/var/lib/mysql from mysql-persistent-storage (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-n94rj (ro)
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
mysql-persistent-storage:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: mysql-pv-claim
ReadOnly: false
default-token-n94rj:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-n94rj
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: <none>
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
29m 29m 1 default-scheduler Normal Scheduled Successfully assigned wordpress-mysql-1894417608-vljsm to rh4
29m 29m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id 9f305c7fe737; Security:[seccomp=unconfined]
29m 29m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id 9f305c7fe737
29m 29m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id ba26b6fb0afc; Security:[seccomp=unconfined]
29m 29m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id ba26b6fb0afc
29m 29m 2 kubelet, rh4 Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "mysql" with CrashLoopBackOff: "Back-off 10s restarting failed container=mysql pod=wordpress-mysql-1894417608-vljsm_default(2074c5c0-72dc-11e7-aafb-001dd8008f63)"
28m 28m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id d76e629b9548
28m 28m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id d76e629b9548; Security:[seccomp=unconfined]
28m 28m 2 kubelet, rh4 Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "mysql" with CrashLoopBackOff: "Back-off 20s restarting failed container=mysql pod=wordpress-mysql-1894417608-vljsm_default(2074c5c0-72dc-11e7-aafb-001dd8008f63)"
28m 28m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id fcae4f1e7f86
28m 28m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id fcae4f1e7f86; Security:[seccomp=unconfined]
28m 28m 3 kubelet, rh4 Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "mysql" with CrashLoopBackOff: "Back-off 40s restarting failed container=mysql pod=wordpress-mysql-1894417608-vljsm_default(2074c5c0-72dc-11e7-aafb-001dd8008f63)"
27m 27m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id 5ab0b825b247
27m 27m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id 5ab0b825b247; Security:[seccomp=unconfined]
27m 26m 6 kubelet, rh4 Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "mysql" with CrashLoopBackOff: "Back-off 1m20s restarting failed container=mysql pod=wordpress-mysql-1894417608-vljsm_default(2074c5c0-72dc-11e7-aafb-001dd8008f63)"
26m 26m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id 1fd6c0d3ac9d; Security:[seccomp=unconfined]
26m 26m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id 1fd6c0d3ac9d
26m 23m 13 kubelet, rh4 Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "mysql" with CrashLoopBackOff: "Back-off 2m40s restarting failed container=mysql pod=wordpress-mysql-1894417608-vljsm_default(2074c5c0-72dc-11e7-aafb-001dd8008f63)"
23m 23m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id 10d68e7ac5b3; Security:[seccomp=unconfined]
23m 23m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id 10d68e7ac5b3
18m 18m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id 06848eb5a40d
18m 18m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id 06848eb5a40d; Security:[seccomp=unconfined]
13m 13m 1 kubelet, rh4 spec.containers{mysql} Normal Started Started container with docker id b685ed1a8f06
13m 13m 1 kubelet, rh4 spec.containers{mysql} Normal Created Created container with docker id b685ed1a8f06; Security:[seccomp=unconfined]
8m 2m 2 kubelet, rh4 spec.containers{mysql} Normal Started (events with common reason combined)
8m 2m 2 kubelet, rh4 spec.containers{mysql} Normal Created (events with common reason combined)
29m 2m 11 kubelet, rh4 spec.containers{mysql} Normal Pulled Container image "mysql:5.6" already present on machine
23m 1s 109 kubelet, rh4 Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "mysql" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=mysql pod=wordpress-mysql-1894417608-vljsm_default(2074c5c0-72dc-11e7-aafb-001dd8008f63)"
29m 1s 135 kubelet, rh4 spec.containers{mysql} Warning BackOff Back-off restarting failed docker container