容器初始化失败-使用Kubernetes中的Helm Charts部署Artifactory

时间:2020-02-28 07:37:31

标签: kubernetes kubernetes-helm

我尝试使用Helm图表安装jfrog构件。 artifactory-0窗格无限期地等待容器初始化。

我使用此链接https://hub.helm.sh/charts/jfrog/artifactory-oss安装了Jfrog Artifactory。

我正在使用kubernetes v1.14。在Premise VM上,ESXI Hypervisor。


EDIT 02 / Mar

PV:

volume-artifactory-0                       10Gi       RWO            Retain           Bound    default/artifactory-volume-artifactory-oss-artifactory-0                                  7m
volume-postgresql-0                        10Gi       RWO            Retain           Bound    default/data-artifactory-oss-postgresql-0                                                 5m38s

PVC:

artifactory-volume-artifactory-oss-artifactory-0   Bound    volume-artifactory-0                       10Gi       RWO                                  9m19s
data-artifactory-oss-postgresql-0                  Bound    volume-postgresql-0                        10Gi       RWO                                  9m3s

EDIT 04 / mar

StorageClass:

NAME                  PROVISIONER                    AGE
managed-nfs-storage   fuseim.pri/ifs                 132d
standard              kubernetes.io/no-provisioner   156d

EDIT 06 / mar

PVC(06 /月):

NAME                                               STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS          AGE
artifactory-volume-artifactory-oss-artifactory-0   Pending                                                                        standard              24s
data-artifactory-oss-postgresql-0                  Pending                                                                        standard              6s

编辑09/03

PVC:

artifactory-volume-artifactory-oss-artifactory-0   Bound    pvc-3804670b-3e13-4162-bbf9-bb945c45ddbd   10Gi       RWO            managed-nfs-storage   16m
data-artifactory-oss-postgresql-0                  Bound    pvc-18a744d3-3f3d-4a36-b8bc-7ecc593fc04d   10Gi       RWO            managed-nfs-storage   16m
s

kubectl获取事件--sort-by ='。lastTimestamp':

2m7s        Normal    Created                 pod/artifactory-oss-artifactory-0                                                 Created container wait-for-db
2m7s        Normal    Started                 pod/artifactory-oss-artifactory-0                                                 Started container wait-for-db
100s        Normal    Started                 pod/artifactory-oss-postgresql-0                                                  Started container init-chmod-data
100s        Normal    Created                 pod/artifactory-oss-postgresql-0                                                  Created container init-chmod-data
100s        Normal    Pulled                  pod/artifactory-oss-postgresql-0                                                  Successfully pulled image "docker.io/bitnami/minideb:stretch"
72s         Warning   BackOff                 pod/artifactory-oss-postgresql-0                                                  Back-off restarting failed container
62s         Warning   VolumeFailedDelete      persistentvolume/pvc-97666796-67b0-4152-b801-2cd84dcbc106                         remove /persistentvolumes/default-artifactory-volume-artifactory-oss-artifactory-0-pvc-97666796-67b0-4152-b801-2cd84dcbc106/bootstrap/access/etc/security/join.key: permission denied
58s         Normal    Pulling                 pod/artifactory-oss-postgresql-0                                                  Pulling image "docker.io/bitnami/minideb:stretch"
54s         Warning   Unhealthy               pod/artifactory-oss-artifactory-nginx-54b677c764-2lpws                            Readiness probe failed: Get http://192.168.233.227:80/router/api/v1/system/health: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
51s         Warning   Unhealthy               pod/artifactory-oss-artifactory-nginx-54b677c764-2lpws                            Liveness probe failed: Get http://192.168.233.227:80/router/api/v1/system/health: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
42s         Warning   VolumeFailedDelete      persistentvolume/pvc-f2b1461f-35b5-4199-9395-6b0b4ff7ea05                         remove /persistentvolumes/default-artifactory-volume-artifactory-oss-artifactory-0-pvc-f2b1461f-35b5-4199-9395-6b0b4ff7ea05/bootstrap/access/etc/security/join.key: permission denied

kubectl获得豆荚:

NAME                                                 READY   STATUS                  RESTARTS   AGE
artifactory-oss-artifactory-0                        0/1     Init:3/5                0          12m
artifactory-oss-artifactory-nginx-54b677c764-2lpws   0/1     Running                 6          12m
artifactory-oss-postgresql-0                         0/1     Init:CrashLoopBackOff   7          12m

1 个答案:

答案 0 :(得分:0)

“ FailedBinding:此声明没有可用的持久卷,并且未设置任何存储类。”

我看到您已经配置了两个StorageClass,但是默认设置为无。

  • 将此注释添加到您要成为要在其上部署工件OS的默认StorageClass(用SC替换<your-class-name>
kubectl patch storageclass <your-class-name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

进一步了解Change the default StorageClass Page

我也强烈建议:


编辑: 根据上述建议,我们开始在您的环境中发现不同的问题,因此为了帮助您,我将向您提供一些故障排除页面,以便您可以测试环境的组件:

在您的日志中,我看到您正在尝试设置NFS存储,所以我建议: