Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
Configurar el límite de frecuencia del gestor de controladores
En esta página se describe cómo configurar el límite de frecuencia general (límite de frecuencia de contenedor de tokens) del gestor de controladores en Config Connector.
El límite de frecuencia controla el número de solicitudes que Config Connector envía al servidor de la API de Kubernetes. Hay dos ajustes:
El ajuste qps (consultas por segundo) determina la frecuencia media a la que Config Connector puede enviar solicitudes al servidor de la API de Kubernetes.
El valor burst permite enviar más solicitudes que el límite qps
durante periodos cortos. Esto ayuda a Config Connector a conciliar rápidamente, incluso en momentos en los que se requieren más consultas al servidor de la API de Kubernetes, como cuando se aplica un nuevo lote de configuración mediante GitOps.
Puedes imaginar el algoritmo de "cubo de tokens" para limitar la frecuencia de la siguiente manera: imagina un cubo con una capacidad de burst tokens que se rellena a una frecuencia de qps. Cada solicitud requiere un token del contenedor. Si el contenedor está vacío, las solicitudes se retrasan hasta que haya tokens disponibles.
Configurar el límite de frecuencia del gestor de controladores con espacio de nombres
Si Config Connector está configurado para ejecutarse en modo de espacio de nombres, puedes usar el recurso personalizado NamespacedControllerReconciler para configurar el límite de frecuencia del cliente de Kubernetes del controlador cnrm-controller-manager en el espacio de nombres que hayas designado. Puedes configurar el límite de frecuencia de este controlador en Config Connector 1.119 y versiones posteriores.
Crea un archivo llamado configure-rate-limit.yaml y copia el siguiente YAML en él:
apiVersion:customize.core.cnrm.cloud.google.com/v1beta1kind:NamespacedControllerReconcilermetadata:name:cnrm-controller-manager# name must not contain the namespace ID suffixnamespace:NAMESPACEspec:rateLimit:qps:80# the default value is 20burst:40# the default value is 30
Sustituye NAMESPACE por el nombre de tu espacio de nombres.
Usa kubectl apply para aplicar la configuración del límite de frecuencia a tu clúster:
kubectl apply -f configure-rate-limit.yaml
Para comprobar que la configuración se ha realizado correctamente, ejecuta el siguiente comando:
kubectl get namespacedcontrollerreconciler cnrm-controller-manager -n NAMESPACE -o jsonpath='{.status.healthy}'
En el resultado, el campo status.healthy debe tener el valor true.
Para comprobar que las marcas --qps y --burst se han añadido al contenedor del gestor del controlador cnrm-controller-manager, ejecuta el siguiente comando:
Configurar el límite de frecuencia en el modo de clúster
A partir de la versión 1.125, si Config Connector está configurado para ejecutarse en modo de clúster, puedes configurar el límite de frecuencia del cliente de Kubernetes del controlador cnrm-controller-manager con el recurso personalizado ControllerReconciler.
El uso es similar al del modo con espacio de nombres, pero en este caso debes usar el CR ControllerReconciler en lugar de NamespacedControllerReconciler, como en el siguiente ejemplo:
apiVersion:customize.core.cnrm.cloud.google.com/v1alpha1kind:ControllerReconcilermetadata:name:cnrm-controller-managerspec:rateLimit:qps:80# the default value is 20burst:40# the default value is 30
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (UTC)."],[[["\u003cp\u003eConfig Connector's controller manager rate limit can be configured to control the number of requests made to the Kubernetes API server.\u003c/p\u003e\n"],["\u003cp\u003eThe rate limit is defined by \u003ccode\u003eqps\u003c/code\u003e (queries per second) which determines the average request rate, and \u003ccode\u003eburst\u003c/code\u003e which allows for temporary higher request volumes.\u003c/p\u003e\n"],["\u003cp\u003eIn namespaced mode (version 1.119+), the \u003ccode\u003eNamespacedControllerReconciler\u003c/code\u003e custom resource is used to set the rate limit, specifying \u003ccode\u003eqps\u003c/code\u003e and \u003ccode\u003eburst\u003c/code\u003e values within a given namespace.\u003c/p\u003e\n"],["\u003cp\u003eIn cluster mode (version 1.125+), the \u003ccode\u003eControllerReconciler\u003c/code\u003e custom resource is used to configure the \u003ccode\u003ecnrm-controller-manager\u003c/code\u003e's rate limit, defining \u003ccode\u003eqps\u003c/code\u003e and \u003ccode\u003eburst\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Configure the controller manager rate limit\n===========================================\n\n*** ** * ** ***\n\nThis pages describes how to configure the overall rate limit (token bucket rate\nlimit) for the controller manager in Config Connector.\n\nThe rate limit controls how many requests Config Connector makes to the\nKubernetes API server. There are two settings:\n\n- The `qps` (queries per second) setting determines\n the average rate at which Config Connector can make requests to the\n Kubernetes API server.\n\n- The `burst` value allows for more requests than the `qps` limit\n for short periods. This helps Config Connector to reconcile\n quickly, even during times which require more queries to the Kubernetes\n API server, such as when applying a new batch of configuration using GitOps.\n\nYou can think of the \"token bucket\" algorithm for rate limiting like this:\nimagine a bucket of capacity `burst` tokens, being refilled at the `qps`\nrate. Each request requires one token from the bucket. If the bucket is empty,\nrequests are delayed until tokens become available.\n\nConfigure the rate limit for namespaced controller manager\n----------------------------------------------------------\n\nIf Config Connector is configured to run in\n[namespaced mode](/config-connector/docs/how-to/install-namespaced), you can\nuse the `NamespacedControllerReconciler` custom resource to configure the rate\nlimit of the `cnrm-controller-manager` controller's Kubernetes client\nin your designated namespace. You can configure rate limit for this\ncontroller in Config Connector version 1.119 and later.\n\n1. Create a file named `configure-rate-limit.yaml` and copy the\n following YAML into it:\n\n apiVersion: customize.core.cnrm.cloud.google.com/v1beta1\n kind: NamespacedControllerReconciler\n metadata:\n name: cnrm-controller-manager # name must not contain the namespace ID suffix\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNAMESPACE\u003c/span\u003e\u003c/var\u003e\n spec:\n rateLimit:\n qps: 80 # the default value is 20\n burst: 40 # the default value is 30\n\n Replace \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e with the name of your namespace.\n2. Use `kubectl apply` to apply the rate limit configuration to your cluster:\n\n ```\n kubectl apply -f configure-rate-limit.yaml\n ```\n3. Verify the configuration is successful by running the following command:\n\n ```\n kubectl get namespacedcontrollerreconciler cnrm-controller-manager -n NAMESPACE -o jsonpath='{.status.healthy}'\n ```\n\n The output should display `status.healthy` field set to `true`.\n4. Verify that the `--qps` and `--burst` flags are added to the\n `cnrm-controller-manager` controller's manager container by running the following command:\n\n ```\n kubectl describe statefulsets -n cnrm-system -l \"cnrm.cloud.google.com/scoped-namespace=NAMESPACE\"\n ```\n\n The output should contain the following: \n\n Containers:\n manager:\n Image: gcr.io/gke-release/cnrm/controller:fd4c42c\n Port: 23232/TCP\n Host Port: 0/TCP\n Command:\n /configconnector/manager\n Args:\n --qps=80\n --burst=40\n --scoped-namespace=config-control\n --prometheus-scrape-endpoint=:8888\n\nConfigure the rate limit in cluster mode\n----------------------------------------\n\nStarting in version 1.125, if Config Connector is configured to run in cluster\nmode, you can configure the rate limit of the `cnrm-controller-manager`\ncontroller's Kubernetes client using the `ControllerReconciler` custom resource.\nThe usage is similar to the namespaced mode, but in this case, you should\nuse the `ControllerReconciler` CR instead of `NamespacedControllerReconciler`,\nas in the following example: \n\n apiVersion: customize.core.cnrm.cloud.google.com/v1alpha1\n kind: ControllerReconciler\n metadata:\n name: cnrm-controller-manager\n spec:\n rateLimit:\n qps: 80 # the default value is 20\n burst: 40 # the default value is 30"]]