diff --git a/k8sclient/k8sclient.go b/k8sclient/k8sclient.go index 8a2184d59..389f3f094 100644 --- a/k8sclient/k8sclient.go +++ b/k8sclient/k8sclient.go @@ -21,6 +21,7 @@ import ( "os" "regexp" "strings" + "time" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -402,6 +403,8 @@ func GetK8sClient(kubeconfig string, kubeClient *ClientInfo) (*ClientInfo, error // Specify that we use gRPC config.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json" config.ContentType = "application/vnd.kubernetes.protobuf" + // Set the config timeout to one minute. + config.Timeout = time.Minute // creates the clientset client, err := kubernetes.NewForConfig(config)