`[root@k8s-master ]# kubectl describe pod ks-gitlab-redis-57987d64f9-z59bt -n kubesphere-devops-system
Name: ks-gitlab-redis-57987d64f9-z59bt
Namespace: kubesphere-devops-system
Priority: 0
PriorityClassName: <none>
Node: 192.168.1.141/192.168.1.141
Start Time: Tue, 24 Dec 2019 14:10:41 +0800
Labels: app=redis
pod-template-hash=57987d64f9
release=ks-gitlab
Annotations: checksum/config: 5792e47955b52b0782b974a1b3f86d300da1a39376fde10ff3581404d5f78927
Status: Pending
IP:

Controlled By: ReplicaSet/ks-gitlab-redis-57987d64f9
Init Containers:
configure:
Container ID:

Image: busybox:1.28.4
Image ID:

Port: <none>
Host Port: <none>
Command:
sh
/config/configure
State: Waiting
Reason: PodInitializing
Ready: False
Restart Count: 0
Requests:
cpu: 50m
Environment: <none>
Mounts:
/config from ks-gitlab (ro)
/metrics from ks-gitlab-metrics (rw)
/redis from ks-gitlab-config (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-lb67m (ro)
Containers:
redis:
Container ID:

Image: redis:5.0.5-alpine
Image ID:

Port: 6379/TCP
Host Port: 0/TCP
Args:
redis-server
/etc/redis/redis.conf
State: Waiting
Reason: PodInitializing
Ready: False
Restart Count: 0
Requests:
cpu: 100m
memory: 64Mi
Environment: <none>
Mounts:
/data/redis/ from ks-gitlab-data (rw)
/etc/redis/ from ks-gitlab-config (ro)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-lb67m (ro)
metrics:
Container ID:

Image: oliver006/redis_exporter:v0.34.1-alpine
Image ID:

Port: 9121/TCP
Host Port: 0/TCP
State: Waiting
Reason: PodInitializing
Ready: False
Restart Count: 0
Environment:
REDIS_FILE: /metrics/redis
Mounts:
/metrics from ks-gitlab-metrics (ro)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-lb67m (ro)
Conditions:
Type Status
Initialized False
Ready False
ContainersReady False
PodScheduled True
Volumes:
ks-gitlab-metrics:
Type: EmptyDir (a temporary directory that shares a pod’s lifetime)
Medium: Memory
SizeLimit: <unset>
ks-gitlab-config:
Type: EmptyDir (a temporary directory that shares a pod’s lifetime)
Medium: Memory
SizeLimit: <unset>
ks-gitlab:
Type: Projected (a volume that contains injected data from multiple sources)
ConfigMapName: ks-gitlab-redis
ConfigMapOptional: <nil>
SecretName: ks-gitlab-redis-secret
SecretOptionalName: <nil>
ks-gitlab-data:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: ks-gitlab-redis
ReadOnly: false
default-token-lb67m:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-lb67m
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message


Warning FailedMount 88m (x119 over 5h57m) kubelet, 192.168.1.141 Unable to mount volumes for pod “ks-gitlab-redis-57987d64f9-z59bt_kubesphere-devops-system(1c2d5552-2614-11ea-be02-566fb92c006e)”: timeout expired waiting for volumes to attach or mount for pod “kubesphere-devops-system”/“ks-gitlab-redis-57987d64f9-z59bt”. list of unmounted volumes=[ks-gitlab]. list of unattached volumes=[ks-gitlab-metrics ks-gitlab-config ks-gitlab ks-gitlab-data default-token-lb67m]
Warning FailedMount 82m (x144 over 5h59m) kubelet, 192.168.1.141 MountVolume.SetUp failed for volume “ks-gitlab” : secret “ks-gitlab-redis-secret” not found
Warning FailedMount 78s (x13 over 11m) kubelet, 192.168.1.141 MountVolume.SetUp failed for volume “ks-gitlab” : secret “ks-gitlab-redis-secret” not found
Warning FailedMount 29s (x5 over 9m31s) kubelet, 192.168.1.141 Unable to mount volumes for pod “ks-gitlab-redis-57987d64f9-z59bt_kubesphere-devops-system(1c2d5552-2614-11ea-be02-566fb92c006e)”: timeout expired waiting for volumes to attach or mount for pod “kubesphere-devops-system”/“ks-gitlab-redis-57987d64f9-z59bt”. list of unmounted volumes=[ks-gitlab]. list of unattached volumes=[ks-gitlab-metrics ks-gitlab-config ks-gitlab ks-gitlab-data default-token-lb67m]
`


为什么初始化失败,我看了日志是缺少secret,是要手动创建吗?

    2 个月 后

    试试这个行不:
    kubectl -n kubesphere-system create secret generic ks-gitlab-redis-secret \
    –from-file=ca.crt=/etc/kubernetes/pki/ca.crt \
    –from-file=ca.key=/etc/kubernetes/pki/ca.key

    3 个月 后
    4 天 后

    rayzhou2017 开topic?什么意思,官方没有写。我搜了一下论坛,处理方法都是2.0的,试了一下,重启应用商店相对应的pod还是访问超时

      chrinly 这个论坛应该有人遇到应用商店方面的问题,你可以搜一下,如果没有你想要的答案就另外开一个主题,说明详细情况,比如环境,复现路径等。