Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用kubernetes1.20.*部署踩坑记 #190

Open
forgottener opened this issue Dec 31, 2020 · 9 comments
Open

使用kubernetes1.20.*部署踩坑记 #190

forgottener opened this issue Dec 31, 2020 · 9 comments
Labels
question Further information is requested

Comments

@forgottener
Copy link

照着非Quick Start指南一步步操作,nfs都是没问题的,翻来覆去就是不成功,nacos的pods报错kubectl logs -f nacos-0 0/4 nodes are available: 4 pod has unbound immediate PersistentVolumeClaims.
这一行错误全网都没有解决方案,kubectl get pvc 3个都是pending,照这条路怎么也查不到,灵机一动想到看看nfs-client-provisioner日志吧,嘿好家伙错误日志如下:

I1231 09:05:32.221800       1 controller.go:987] provision "default/logdir-nacos-0" class "managed-nfs-storage": started
I1231 09:05:32.221840       1 controller.go:987] provision "default/plugindir-nacos-0" class "managed-nfs-storage": started
I1231 09:05:32.221965       1 controller.go:987] provision "default/datadir-nacos-0" class "managed-nfs-storage": started
E1231 09:05:32.235211       1 controller.go:1004] provision "default/plugindir-nacos-0" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference
E1231 09:05:32.235253       1 controller.go:1004] provision "default/logdir-nacos-0" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference
E1231 09:05:32.235464       1 controller.go:1004] provision "default/datadir-nacos-0" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

这一顿操作就明了了click here,原来是kubernetes1.20.0废弃了selfLink解决办法是重新加回来

vi /etc/kubernetes/manifests/kube-apiserver.yaml

## 增加一行
- --feature-gates=RemoveSelfLink=false
## 使之生效
kubectl apply -f /etc/kubernetes/manifests/kube-apiserver.yaml
@mingcheng
Copy link

感谢,同样碰到一模一样的问题,根据这个 Issues 解决了。

补充下,如果是控制面集群只需要修改一台然后 apply 就行(简单粗暴的直接 delete,然后会自动重建)。

@only21tender
Copy link

我的kubernets是1.20.2,创建snapshot的时候提示:
kubectl describe volumesnapshot rbd-pvc-snapshot |grep Message
Message: Failed to create snapshot: selfLink was empty, can't make reference
参考咱们这里的方法修改了kube-apiserver.yaml,后面k8s集群直接崩溃无法使用了

@forgottener
Copy link
Author

我的kubernets是1.20.2,创建snapshot的时候提示:
kubectl describe volumesnapshot rbd-pvc-snapshot |grep Message
Message: Failed to create snapshot: selfLink was empty, can't make reference
参考咱们这里的方法修改了kube-apiserver.yaml,后面k8s集群直接崩溃无法使用了

只修改主节点的kube-apiserver.yaml,然后执行kubectl apply -f /etc/kubernetes/manifests/kube-apiserver.yaml就可以了,这个加回SelfLink应该不会导致集群崩溃的

@DapengJiao
Copy link

直接修改完静态Pod的manifest文件后,K8S应该就会自动更新这些静态Pod的。
应该不需要在额外运行kubectl apply命令。

@oneinstack
Copy link

nfs deployment.yaml image change to : gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.2

@paderlol paderlol pinned this issue Apr 8, 2021
@paderlol paderlol added the question Further information is requested label Apr 8, 2021
@paderlol
Copy link
Collaborator

paderlol commented Apr 8, 2021

感谢一路踩坑并记录,我把这个issue置顶了,方便其他人查看。

@duiniwukenaihe
Copy link

我想知道 k8s 部署nacos为什么日志会那么大....有没有变量或者参数修改一下?打印的raft 下面log太多了

@helloxk617
Copy link

1.24.1的版本,这个方法似乎已经不适用了,logs报Error: invalid argument "RemoveSelfLink=false" for "--feature-gates" flag: cannot set feature gate RemoveSelfLink to false, feature is locked to true“

@Hypo5279
Copy link

Kubernetes v1.24.9,deploy/nfs/deployment.yaml image change to :registry.cn-shenzhen.aliyuncs.com/shuhui/nfs-subdir-external-provisioner:v4.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants