Skip to main content
Version: main 🚧

Metrics server

Limited vCluster Tenancy Configuration Support

This feature is only available when using the following worker node types:

  • Host Nodes
  • Reusing host metrics server​

    Create a vcluster.yaml with:

    integrations:
    metricsServer:
    enabled: true
    nodes: true
    pods: true

    Then create a vCluster with:

    vcluster create host-metrics-vcluster -f vcluster.yaml

    Then the metrics api should be available within the vCluster. This will obviously require a metrics server to be installed on the host cluster.

    If your metrics server is not using the default kube-system/metrics-server service, you can also configure a custom one via:

    integrations:
    metricsServer:
    enabled: true
    apiService:
    service:
    name: my-custom-metrics-server
    namespace: my-custom-namespace
    port: 443

    If you are using network policies, you need to add the metrics server pod to the allowed rules the control plane can communicate with:

    policies:
    networkPolicy:
    extraControlPlaneRules:
    - to:
    - podSelector:
    matchLabels:
    k8s-app: metrics-server
    namespaceSelector:
    matchLabels:
    kubernetes.io/metadata.name: 'my-metrics-server-namespace'

    Config reference​

    metricsServer required object ​

    MetricsServer reuses the metrics server from the host cluster within the vCluster.

    enabled required boolean false ​

    Enabled signals the metrics server integration should be enabled.

    apiService required object ​

    APIService holds information about where to find the metrics-server service. Defaults to metrics-server/kube-system.

    service required object ​

    Service is a reference to the service for the API server.

    name required string ​

    Name is the name of the host service of the apiservice.

    namespace required string ​

    Namespace is the name of the host service of the apiservice.

    port required integer ​

    Port is the target port on the host service to connect to.

    nodes required boolean true ​

    Nodes defines if metrics-server nodes api should get proxied from host to virtual cluster.

    pods required boolean true ​

    Pods defines if metrics-server pods api should get proxied from host to virtual cluster.