简体   繁体   English

在使用 Calico 的裸机 Kubernetes 集群上遵循 OpenEBS 安装说明后无法创建 PVC

[英]Cannot create a PVC after following OpenEBS installation instructions on a bare metal Kubernetes cluster with Calico

I tried my best to follow the instructions to create a bare-metal Kubernetes 1.18 cluster.我尽力按照说明创建裸机 Kubernetes 1.18 集群。 I installed the Calico network.我安装了 Calico 网络。 I joined another control-plane node to my cluster successfully.我成功地将另一个控制平面节点加入了我的集群。 I installed OpenEBS using their instructions.我按照他们的说明安装了 OpenEBS。 I used Helm 3 to install it.我使用 Helm 3 安装它。

Just to rub that last part in, I see the storage classes created只是为了摩擦最后一部分,我看到创建的存储类

NAME                        PROVISIONER                                                RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-hostpath              openebs.io/local                                           Delete          WaitForFirstConsumer   false                  42m
x-openebs-hostpath   openebs.io/local                                           Delete          WaitForFirstConsumer   false                  40m
openebs-device              openebs.io/local                                           Delete          WaitForFirstConsumer   false                  68m
openebs-hostpath            openebs.io/local                                           Delete          WaitForFirstConsumer   false                  68m
openebs-jiva-default        openebs.io/provisioner-iscsi                               Delete          Immediate              false                  68m
openebs-snapshot-promoter   volumesnapshot.external-storage.k8s.io/snapshot-promoter   Delete          Immediate              false                  68m

But when I try to create a PVC using the built-in openebs-hostpath storage class...但是当我尝试使用内置的openebs-hostpath存储 class 创建 PVC 时...

# cat pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: local-hostpath-pvc
spec:
  storageClassName: openebs-hostpath
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5G

I am met with the following error:我遇到以下错误:

# kubectl apply -f pvc.yaml
Error from server (InternalError): error when creating "pvc.yaml": Internal error occurred: failed calling webhook "admission-webhook.openebs.io": Post https://admission-server-svc.openebs.svc:443/validate?timeout=5s: context deadline exceeded

I don't know enough about Kubernetes to know how to proceed.我对 Kubernetes 知之甚少,不知道如何进行。 My gut feeling is that there is a DNS problem and that I cannot resolve that service from whereever I need to be resolving it from, even though there is such a service:我的直觉是存在 DNS 问题,我无法从需要解决的任何地方解决该服务,即使有这样的服务:

# kubectl get service --namespace openebs
NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
admission-server-svc   ClusterIP   10.98.82.69     <none>        443/TCP    70m
openebs-apiservice     ClusterIP   10.111.216.55   <none>        5656/TCP   71m

If it matters, my physical LAN address is a 10.250.0.0/24 address.如果重要的话,我的物理 LAN 地址是 10.250.0.0/24 地址。

How should I even begin to troubleshoot this problem?我什至应该如何开始解决这个问题? From where should I be able to resolve the admission-server-svc.openebs.svc hostname?我应该能够从哪里解析admission-server-svc.openebs.svc主机名? Why can I not resolve it from my master node?为什么我不能从我的主节点解决它?

I met the same trouble.我遇到了同样的麻烦。 The reason is that kube-apiserver use the host dns, you can open the file /etc/kubernetes/manifests/kube-apiserver.yaml on master node and find the hostNetwork: true , but we can't edit hostNetwrok value.原因是 kube-apiserver 使用主机 dns,您可以在 master 节点上打开文件/etc/kubernetes/manifests/kube-apiserver.yaml并找到hostNetwork: true ,但我们无法编辑hostNetwrok值。

I am very confused about it.我对此感到非常困惑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM