Im using the following code
kubeconfig = resolveKubeconfig(kubeconfig)
if kubeconfig == "" {
return nil, fmt.Errorf("%s: %w", msgCouldNotCreateClientConfig, ErrLocatingKubeconfig)
}
config, err := clientcmd.BuildConfigFromFlags("", kubeconfig)
Now I use unstruct to apply resource to the cluster (5 simple deployments)
And I saw that the apply is taking time like starting throttling,
when I change the config to use like
config.QPS = 250
it works better, and I dont face any issue.
I understand that its related for the rate limit of k8s api with the api server.
two questions:
Should I use also Burst?
I didnt find a lot of docs on the QPS and Burst ...
By default in client-go
the Burst is 10 and QPS is 5
so it should not block you if you just applied several request.
To increase the Burst
and OPS
no effect to your application but may create heavy load on the api-server
.