A machine-readable index of this documentation for AI agents is available at https://kubevela.io/llms.txt. Markdown versions of documentation pages are available by appending .md to their URLs.
Skip to main content
Version: Cluster Gateway Next

Configure Cluster Gateway

Cluster Gateway is configured with command-line flags. With the standalone chart, a few of them are chart values; anything else means editing the Deployment's args. With KubeVela, the vela-core chart sets the flags from its multicluster.clusterGateway.* values, and vela-core has flags of its own for how it talks to the gateway.

Gateway flags​

These are the gateway's own flags, the same in 1.9.2 and 1.10.0-alpha.1:

FlagDefaultWhat it does
--secret-namespacevela-systemThe namespace cluster Secrets are read from.
--authorize-proxy-subpathfalseAlso check the request inside the proxy against the hub's RBAC, as the calling user: a request for Pods on a member cluster then needs permission for Pods on the hub too.
--cluster-gateway-proxy-configPath to a proxy configuration file.
--ocm-integrationfalseRead each cluster's endpoint and CA from its OCM ManagedCluster instead of the Secret. The Secret still holds the credential.
--proxy-host, --proxy-portnone, 8090OCM cluster-proxy's address, for clusters with the ClusterProxy endpoint type. Setting --proxy-host requires the three below.
--proxy-ca-cert, --proxy-cert, --proxy-keyThe CA and client certificate for connecting to cluster-proxy.
--virtual-clutser-with-control-planetrueList the hub as the local cluster in virtualclusters. The flag is spelled that way.
--user-agentThe User-Agent for the gateway's own requests to the hub.
--standalone-debug-modefalseRun on a workstation with authorization and admission off. Only allowed with --bind-address=127.0.0.1.

It's built on the Kubernetes API server library, so it also takes the standard aggregated API server flags. The ones that matter here:

FlagDefaultWhat it does
--secure-port443The HTTPS port. Both charts set 9443.
--tls-cert-file, --tls-private-key-fileThe serving certificate. Without them the gateway writes a self-signed one at startup.
--authorization-always-allow-paths/healthz,/readyz,/livezPaths served without asking the hub. vela-core's chart adds /metrics.
--enable-priority-and-fairnesstrueAPI priority and fairness on the gateway's own requests. vela-core's chart turns it off.
--feature-gatesThe feature gates below.
-v0Log verbosity.

1.10.0-alpha.1 dropped the etcd flags and the component:Gate=value form of --feature-gates: see Upgrade.

Feature gates​

GateDefaultWhat it does
SecretCachetrue (beta)Read cluster Secrets from an informer on the Secret namespace instead of from the hub on every request.
OCMClusterCachetrue (beta)The same for OCM ManagedClusters, with --ocm-integration.
ClientIdentityPenetrationfalse (alpha)Impersonate the original hub user on the member cluster, so the member's RBAC applies to them. The registered credential needs permission to impersonate. Enables the per-cluster proxy configuration below.
HealthinessCheckfalse (alpha)Show the health status stored in each cluster Secret's annotations, which the health subresource writes.

APIPriorityAndFairness, a gate Kubernetes has removed, is still accepted: the gateway turns it into --enable-priority-and-fairness instead of refusing to start.

Standalone chart values​

ValueDefaultWhat it does
imageoamdev/cluster-gatewayThe image.
tagv + chart versionThe image tag. Always set it: the default, v0.1.0, doesn't exist.
replicas1Number of gateway pods.
secretNamespaceopen-cluster-management-credentialsPassed as --secret-namespace; the chart creates this namespace.
ocmIntegration.enabledfalsePasses --ocm-integration.
ocmIntegration.clusterProxy.enabledfalsePasses the --proxy-* flags, with the certificates from the proxy-client and proxy-server-ca Secrets.
ocmIntegration.clusterProxy.endpoint.host, .portproxy-entrypoint.open-cluster-management-cluster-proxy, 8090cluster-proxy's address.
featureGate.healthinessfalseTurns HealthinessCheck on.
featureGate.secretCachefalseTurns SecretCache on. It is on by default anyway, so false here does not turn it off.

vela-core chart values​

ValueDefaultWhat it does
multicluster.enabledtrueInstall the gateway and start vela-core with --enable-cluster-gateway.
multicluster.clusterGateway.directtruevela-core calls the gateway's Service directly (--cluster-gateway-url) instead of going through the hub's kube-apiserver.
multicluster.clusterGateway.replicaCount1Number of gateway pods.
multicluster.clusterGateway.port9443The gateway's port.
multicluster.clusterGateway.image.repository, .tag, .pullPolicyoamdev/cluster-gateway, the pinned release, IfNotPresentThe image.
multicluster.clusterGateway.resources50m / 20Mi requested, 500m / 200Mi limitPod resources.
multicluster.clusterGateway.secureTLS.enabledtrueServe a real certificate and have the APIService verify it.
multicluster.clusterGateway.secureTLS.certManager.enabledfalseHave cert-manager issue the certificate. When false, vela-core creates and renews it.
multicluster.clusterGateway.secureTLS.certPath/etc/k8s-cluster-gateway-certsWhere the certificate is mounted in the gateway's pod.
multicluster.metrics.enabledfalsevela-core collects metrics from every cluster through the gateway (--enable-cluster-metrics).
multicluster.clusterGateway.serviceMonitor.enabled, .additionalLabelsfalse, {}A Prometheus ServiceMonitor, with multicluster.metrics.enabled.
authentication.enabledfalseAlso sets ClientIdentityPenetration on the gateway.

The gateway's Secret namespace is the release namespace, and the chart doesn't expose its other flags.

vela-core flags​

vela-core's own flags for the gateway are listed with the rest in Controller Flags and Feature Gates. In short:

FlagWhat it does
--enable-cluster-gatewayTurn on multi-cluster. vela-core waits up to five minutes at startup for the gateway's APIService to become available, then exits.
--cluster-gateway-urlCall the gateway at this address instead of through the hub's kube-apiserver.
--cluster-gateway-ca-fileThe CA to verify the gateway with, for --cluster-gateway-url. Without it, vela-core skips verification.
--cluster-gateway-tls-secret, --cluster-gateway-serviceThe Secret and Service for the serving certificate vela-core creates, renews, and writes into the APIService's caBundle.
--enable-cluster-metrics, --cluster-metrics-intervalCollect metrics from every cluster through the gateway, every 15 seconds by default.

vela-core reads and writes cluster Secrets in the namespace of the Service the APIService points at, so a gateway serving KubeVela has to read Secrets from its own namespace.

Identity exchange​

With ClientIdentityPenetration on, rules in a proxy configuration decide who the gateway impersonates on each member cluster. They're covered in Identity Exchange.

High availability​

The gateway holds no state of its own, so it scales by adding replicas: see High Availability.