diff --git a/cmd/aws-iam-authenticator/add.go b/cmd/aws-iam-authenticator/add.go index 0a8d4bd20..ada11df7e 100644 --- a/cmd/aws-iam-authenticator/add.go +++ b/cmd/aws-iam-authenticator/add.go @@ -193,6 +193,8 @@ func createClient() client.Client { os.Exit(1) } } + kcfg.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json" + kcfg.ContentType = "application/vnd.kubernetes.protobuf" clientset, err := kubernetes.NewForConfig(kcfg) if err != nil { fmt.Println(err) diff --git a/pkg/mapper/configmap/configmap.go b/pkg/mapper/configmap/configmap.go index 2c37431da..0460b8695 100644 --- a/pkg/mapper/configmap/configmap.go +++ b/pkg/mapper/configmap/configmap.go @@ -38,6 +38,8 @@ func New(masterURL, kubeConfig string) (*MapStore, error) { if err != nil { return nil, err } + clientconfig.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json" + clientconfig.ContentType = "application/vnd.kubernetes.protobuf" clientset, err := kubernetes.NewForConfig(clientconfig) if err != nil { return nil, err