Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/metrics-server/app/options/kubelet_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (o KubeletClientOptions) Config(restConfig *rest.Config) *client.KubeletCli
config.Client.TLSClientConfig.Insecure = true
config.Client.TLSClientConfig.CAData = nil
config.Client.TLSClientConfig.CAFile = ""
config.Client.TLSClientConfig.NextProtos = []string{"http/1.1", "h2"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should proceed with this change. Kubelet supports http/2 by default, so it would be more efficient to have http/2 over http/1.1 by default.

But if this solves the reported issue, could it be that EKS LB needs to be configured by users to supports http/2?

}
if len(o.KubeletCAFile) > 0 {
config.Client.TLSClientConfig.CAFile = o.KubeletCAFile
Expand Down
7 changes: 6 additions & 1 deletion cmd/metrics-server/app/options/kubelet_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestConfig(t *testing.T) {
CAFile: "CAFile",
CertData: []byte("CertData"),
KeyData: []byte("KeyData"),
CAData: []byte("CAData"),
CAData: []uint8("CAData"),
},
UserAgent: "UserAgent",
}
Expand Down Expand Up @@ -75,8 +75,13 @@ func TestConfig(t *testing.T) {
expectFunc: func() client.KubeletClientConfig {
e := expected
e.Client.Insecure = true
e.Client.KeyFile = "KeyFile"
e.Client.KeyData = []byte("KeyData")
e.Client.CAFile = ""
e.Client.CAData = nil
e.Client.CertFile = "CertFile"
e.Client.CertData = []byte("CertData")
e.Client.NextProtos = []string{"http/1.1", "h2"}
return e
},
},
Expand Down