Skip to content

Commit f86b236

Browse files
committed
use protobuf content type instead of json for k8s client
1 parent 3886bd8 commit f86b236

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/cloud/k8s_metadata.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ var DefaultKubernetesAPIClient = func() (kubernetes.Interface, error) {
1717
if err != nil {
1818
return nil, err
1919
}
20+
config.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
21+
config.ContentType = "application/vnd.kubernetes.protobuf"
2022
clientset, err := kubernetes.NewForConfig(config)
2123
if err != nil {
2224
return nil, err

0 commit comments

Comments
 (0)