首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Kubernetes错误“无法附加或装入卷”

Kubernetes错误“无法附加或装入卷”
EN

Server Fault用户
提问于 2021-09-09 07:37:21
回答 1查看 5.4K关注 0票数 0

我使用nginx作为负载平衡器(如这里 )部署了bitnami/wordpress头盔。一切正常工作,但问题是,当一些豆荚是手动或自动创建自动标度。其中一些(并非所有)都具有"ContainerCreating“状态,日志如下所示:

代码语言:javascript
复制
  Normal   Scheduled    33m                  default-scheduler  Successfully assigned default/wordpress-69c8f65d96-wnkfv to main-node-d29388
  Warning  FailedMount  4m28s (x6 over 29m)  kubelet            Unable to attach or mount volumes: unmounted volumes=[wordpress-data], unattached volumes=[default-token-s4gdj wordpress-data]: timed out waiting for the condition
  Warning  FailedMount  0s (x9 over 31m)     kubelet            Unable to attach or mount volumes: unmounted volumes=[wordpress-data], unattached volumes=[wordpress-data default-token-s4gdj]: timed out waiting for the condition

我部署了bitnami/wordpress,然后使用以下设置进行升级:

代码语言:javascript
复制
helm install wordpress bitnami/wordpress --set service.type=ClusterIP --set ingress.enabled=true --set ingress.certManager=true --set ingress.annotations."kubernetes\.io/ingress\.class"=nginx --set ingress.annotations."cert-manager\.io/cluster-issuer"=letsencrypt-prod --set ingress.hostname=DOMAIN.com --set ingress.extraTls[0].hosts[0]=DOMAIN.com --set ingress.extraTls[0].secretName=wordpress.local-tls --set wordpressPassword=PASSWORD --set autoscaling.enabled=true --set autoscaling.minReplicas=1 autoscaling.maxReplicas=30

库贝克尔的吊舱看起来像这样

代码语言:javascript
复制
ingress-nginx-ingress-controller-84bff86888-f4tpb                 1/1     Running             0          2d3h
ingress-nginx-ingress-controller-default-backend-c5b786dbbqw5xz   1/1     Running             0          2d3h
load-generator                                                    1/1     Running             0          71s
wordpress-69c8f65d96-48jd9                                        0/1     ContainerCreating   0          18m
wordpress-69c8f65d96-66ftt                                        0/1     ContainerCreating   0          56m
wordpress-69c8f65d96-dq7xq                                        1/1     Running             0          100m
wordpress-69c8f65d96-fbnt6                                        1/1     Running             0          101m
wordpress-69c8f65d96-wnkfv                                        0/1     ContainerCreating   0          56m
wordpress-mariadb-0                                               1/1     Running             0          8h

怎样才能避免新豆荚出现这个问题,并让它们开始呢?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2021-09-09 20:39:37

用户@Juan是对的。我做了类似的方法,我用helm创建了其他POD,它创建了存储,我在wordpress部署中将它设置为persistance。这里描述的是:https://docs.bitnami.com/tutorials/deploy-applications-nfs-kubernetes/

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1077062

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档