1

I tried my best to follow the instructions to create a bare-metal Kubernetes 1.18 cluster. I installed the Calico network. I joined another control-plane node to my cluster successfully. I installed OpenEBS using their instructions. I used Helm 3 to install it.

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...

# 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. 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:

# 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.

How should I even begin to troubleshoot this problem? From where should I be able to resolve the admission-server-svc.openebs.svc hostname? Why can I not resolve it from my master node?

tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126

1 Answers1

0

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.

I am very confused about it.

Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
effi2
  • 1
  • 2