diff --git a/cluster-autoscaler/main.go b/cluster-autoscaler/main.go index 975094311b44..93a23dd8a291 100644 --- a/cluster-autoscaler/main.go +++ b/cluster-autoscaler/main.go @@ -101,6 +101,7 @@ var ( address = flag.String("address", ":8085", "The address to expose prometheus metrics.") kubernetes = flag.String("kubernetes", "", "Kubernetes master location. Leave blank for default") kubeConfigFile = flag.String("kubeconfig", "", "Path to kubeconfig file with authorization and master location information.") + kubeAPIContentType = flag.String("kube-api-content-type", "application/vnd.kubernetes.protobuf", "Content type of requests sent to apiserver.") kubeClientBurst = flag.Int("kube-client-burst", rest.DefaultBurst, "Burst value for kubernetes client.") kubeClientQPS = flag.Float64("kube-client-qps", float64(rest.DefaultQPS), "QPS value for kubernetes client.") cloudConfig = flag.String("cloud-config", "", "The path to the cloud provider configuration file. Empty string for no configuration file.") @@ -408,6 +409,8 @@ func getKubeConfig() *rest.Config { klog.Fatalf("Failed to build Kubernetes client configuration: %v", err) } + kubeConfig.ContentType = *kubeAPIContentType + return kubeConfig }