Kubectl Exec Times Out After 4 Hours
Problem
The **kubectl exec **command is timing out after exactly 4 hours.
Below is the output of the default config map:
$ kubectl describe cm worker-default-kubelet-config -n kube-system
Name: worker-default-kubelet-config
Namespace: kube-system
Labels: <none>
Annotations: <none>
Data
====
kubelet:
----
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
address: 0.0.0.0
authentication:
anonymous:
enabled: false
webhook:
enabled: true
x509:
clientCAFile: "/etc/pf9/kube.d/certs/kubelet/server/ca.crt"
authorization:
mode: AlwaysAllow
clusterDNS:
- "10.21.0.10"
clusterDomain: "cluster.local"
featureGates:
PodPriority: true
DynamicKubeletConfig: true
maxPods: 200
readOnlyPort: 0
tlsCertFile: "/etc/pf9/kube.d/certs/kubelet/server/request.crt"
tlsPrivateKeyFile: "/etc/pf9/kube.d/certs/kubelet/server/request.key"
Events: <none>Environment
Platform9 Managed Kubernetes - All Versions
Cause
The value for streaming-connection-idle-timeout parameter is not set in Kubelet configuration which is responsible for the maximum time a streaming connection can be idle before the connection is automatically closed. The value "0" indicates no timeout. As the value is not defined the command kubectl exec is timing out after 4 hours.
Resolution
Update the configmap and set the value of streamingConnectionIdleTimeout and verify if the change is successful.
Additional Information
Refer the Dynamic Kubelet Configuration for more information.
PreviousPod 'calico-typha' Not Running on Master Node
NextNetplan Apply Moves Cluster To Pending State
Last updated
