Skip to content

Commit 75421fa

Browse files
committed
use protobuf content type instead of json for k8s client
1 parent bdcd2e9 commit 75421fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/cloud/metadata/k8s.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ func DefaultKubernetesAPIClient(kubeconfig string) KubernetesAPIClient {
8484
}
8585
}
8686
}
87+
config.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
88+
config.ContentType = "application/vnd.kubernetes.protobuf"
8789
// creates the clientset
8890
clientset, err = kubernetes.NewForConfig(config)
8991
if err != nil {

0 commit comments

Comments
 (0)