Managed Kubernetes
Latest
Frequently Asked Questions
Solutions
How Tos
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Kubectl Exec Times Out After 4 Hours
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
The *kubectl exec *command is timing out after exactly 4 hours.
Below is the output of the default config map:
xxxxxxxxxx$ kubectl describe cm worker-default-kubelet-config -n kube-systemName: worker-default-kubelet-configNamespace: kube-systemLabels: <none>Annotations: <none> Data====kubelet:----apiVersion: kubelet.config.k8s.io/v1beta1kind: KubeletConfigurationaddress: 0.0.0.0authentication: anonymous: enabled: false webhook: enabled: true x509: clientCAFile: "/etc/pf9/kube.d/certs/kubelet/server/ca.crt"authorization: mode: AlwaysAllowclusterDNS:- "10.21.0.10"clusterDomain: "cluster.local"featureGates: PodPriority: true DynamicKubeletConfig: truemaxPods: 200readOnlyPort: 0tlsCertFile: "/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.
xxxxxxxxxx# kubectl edit cm worker-default-kubelet-config -n kube-system # kubectl describe cm worker-default-kubelet-config -n kube-system | grep "streamingConnectionIdleTimeout"streamingConnectionIdleTimeout: "672h"Additional Information
Refer the Dynamic Kubelet Configuration for more information.
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message