From 75421fae6cc06cc9feadaa96a6c3176317b47a9d Mon Sep 17 00:00:00 2001 From: Bhavitha Koduru Date: Mon, 9 Sep 2024 19:25:09 +0000 Subject: [PATCH] use protobuf content type instead of json for k8s client --- pkg/cloud/metadata/k8s.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cloud/metadata/k8s.go b/pkg/cloud/metadata/k8s.go index a85e6d8f14..c57a220417 100644 --- a/pkg/cloud/metadata/k8s.go +++ b/pkg/cloud/metadata/k8s.go @@ -84,6 +84,8 @@ func DefaultKubernetesAPIClient(kubeconfig string) KubernetesAPIClient { } } } + config.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json" + config.ContentType = "application/vnd.kubernetes.protobuf" // creates the clientset clientset, err = kubernetes.NewForConfig(config) if err != nil {