loft-sh / vcluster

vCluster - Create fully functional virtual Kubernetes clusters - Each vcluster runs inside a namespace of the underlying k8s cluster. It's cheaper than creating separate full-blown clusters and it offers better multi-tenancy and isolation than regular namespaces.
https://www.vcluster.com
Apache License 2.0
6.16k stars 372 forks source link

core-dns failing in civo cluster #73

Closed ratnadeep007 closed 3 years ago

ratnadeep007 commented 3 years ago

Issue Unable to create vcluster in Civo kubernetes cluster which internally uses k3s. Able to connect to api-server but unable to deploy anything as coredns is failing for vcluster

Steps

  1. Created namespace; kubectl create namespace vcluster-1
  2. Used vcluster cli: vcluster create vcluster-1 -n vcluster-1
  3. Connect to cluster: vcluster connect vcluster-1 -n vcluster-1
  4. Tried deploying nginx, it stays in pending state inside vcluster but running state on host.
  5. coredns container is in Pending state for vcluster and ContainerCreating state for host

Logs Events from describe command of core-dns

Self fix or debug Tried changing default storageclass in cluster from civo-volume from provisioner csi.civo.com to local-path from provisioner rancher.io/local-path but same result.

Cluster Type: Managed Cluster based on k3s by Civo.com

FabianKramm commented 3 years ago

@ratnadeep007 thanks for creating this issue! Thats odd, this usually only happens if you try to run vcluster in a cluster without any nodes. What happens if you deploy vcluster with a values.yaml that looks like this:

storage:
  persistence: false
rbac:
  clusterRole:
    create: true
syncer:
  extraArgs:
  - --sync-all-nodes
  - --fake-nodes=false
  - --fake-kubelets=false

and then create the vcluster with vcluster create vcluster-1 -n vcluster-1 -f values.yaml, does that work?

ratnadeep007 commented 3 years ago

@FabianKramm Thanks, it worked. Closing issue.