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

Vcluster is not picking up the configs defined in my vcluster.yaml #1772

Closed
MichaelKora opened this issue May 14, 2024 · 7 comments
Closed
Assignees
Labels

Comments

@MichaelKora
Copy link

MichaelKora commented May 14, 2024

What happened?

i am new to vclsuter and am having trouble gettning it production ready. i was able to deploy the vcluster to my cluster and access it to using vcluster. but it is not working as expected.

What did you expect to happen?

here is my vcluster.yaml file..i deploy it using helm

exportKubeConfig:
  context: "vcluster-context1"
controlPlane:
  distro:
    k3s:
      enabled: true

  coredns:
    enabled: true
    deployment:
      replicas: 3
      nodeSelector:
        kubernetes.io/hostname: "my-node-name"
  statefulSet:
    persistence:
      volumeClaim:
        enabled: true
        size: 3Gi
        storageClass: "my-sc"
    scheduling:
      nodeSelector:
        kubernetes.io/hostname: "my-node-name"

i except it to deploy it in the given node and i expect 3 replicas of the coredns pod..but none of this is working.

Another issue is exporting the config file...is it possible to have the config file generated so that it con be used to connect to the vcluster without accessing the host cluster? for now vcluster connect shows that it is using port forwarding to access the cluster..i would like to have the kube config file so i can share it without allowing the users to access the host cluster

How can we reproduce it (as minimally and precisely as possible)?

using the providing vcluster.yaml file and applying it using helm

Anything else we need to know?

No response

Host cluster Kubernetes version

$ kubectl version
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.11

Host cluster Kubernetes distribution

k3s (with talos -bare metal cluster-)```

</details>


### vlcuster version

<details>

```console
$ vcluster --version
vcluster version 0.19.5

Vcluster Kubernetes distribution(k3s(default)), k8s, k0s)

k3s

OS and Arch

OS: talos
Arch: metal-amd64
@ThomasK33
Copy link
Member

Hey, @MichaelKora, you must update your vCluster CLI to a 0.20 preview version to use the vcluster.yaml.

@MichaelKora
Copy link
Author

hey @ThomasK33...i am using helm to deploy the vcluster.
helm upgrade -i my-vcluster vcluster --repo https://charts.loft.sh --namespace my-vcluster --create-namespace --repository-config='' -f vcluster.yaml

i just use vCluster CLI to connect to the cluster: vcluster connect my-vcluster --namespace --my-vcluster

@MichaelKora
Copy link
Author

MichaelKora commented May 15, 2024

@ThomasK33 i passed the version to the helm cmd:

helm upgrade -i my-vcluster vcluster \
  --repo https://charts.loft.sh \
  --namespace my-vcluster --create-namespace \
  --repository-config='' \
  -f vcluster.yaml \
  --version 0.20.0-beta.5

the config seems to be used this time..but am getting errors i do not understand:

Warning  FailedMount       18s (x7 over 50s)  kubelet, MountVolume.SetUp failed for volume "coredns" : requesting quota of different size: old -1 new 8Gi 

Warning  Unhealthy         9s (x6 over 39s)   kubelet,  Startup probe failed: Get "https://10.244.4.39:8443/readyz": dial tcp 10.244.4.39:8443: connect: connection refused 

@MichaelKora
Copy link
Author

 INFO    commandwriter/commandwriter.go:126    error retrieving resource lock kube-system/kube-controller-manager: Get "https://127.0.0.1:6443/apis/coordination.k8s.io/v1/namespaces/kube-system/leases/kube-cont ││ roller-manager?timeout=5s": dial tcp 127.0.0.1:6443: connect: connection refused    {"component": "vcluster", "component": "controller-manager", "location": "leaderelection.go:332"}  

@MichaelKora

This comment was marked as outdated.

@ThomasK33
Copy link
Member

Hey @MichaelKora, we have a section in our Get started docs showing how to expose the vCluster control plane via an ingress.

If you need more information on the available fields in the ingress or service object, you can check out the config references of the ingress and service.

@MichaelKora
Copy link
Author

MichaelKora commented May 16, 2024

hey @ThomasK33 yeah i ended up finding it..thats why i removed the comment thanks for your support

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

No branches or pull requests

4 participants