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.93k stars 428 forks source link

API response is slow when k8s is using storage products when using vcluster #2170

Closed hr-tsu closed 1 month ago

hr-tsu commented 2 months ago

What happened?

Regarding your question in Issue #1900, it was not possible to change the backingstore without vClusterPro.

What did you expect to happen?

Is there any way to speed up access to storage products without using vClusterPro?

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

I believe it can be reproduced in a k8s environment using storage products

Anything else we need to know?

No response

Host cluster Kubernetes version

```console $ kubectl version # % kubectl version Client Version: v1.30.1 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.27.8 ```

vcluster version

```console vcluster --version vcluster version 0.20.0-beta.5 ```

VCluster Config

No, Settings ``` # My vcluster.yaml / values.yaml here ```
FabianKramm commented 1 month ago

Hey @hr-tsu, thanks for creating this issue, only the embedded etcd and k8s/external database combination is vCluster pro only. In your case I would recommend to use k3s/external database or k8s/deploy etcd, which you can configure via:

# Deploy an etcd alongside vCluster
controlPlane:
  backingStore:
    etcd:
      deploy:
        enabled: true

This works for the oss version without requiring vClusterPro.

hr-tsu commented 1 month ago

Sorry for the late reply.

I built a vCluster with your response and the etcd was started as a separate pod and the API is now very fast.

Also, etcd was built as a pvc and was ready for real production.

We would like to proceed with operation verification, etc. here.

Thank you so much.