Devtron Terminal Connection Timeout Issue on GKE Cluster

Devtron Terminal Connection Timeout Issue on GKE Cluster

Problem:

When connecting to the pod or cluster terminal from the Devtron dashboard on an ingress with gce class in a GKE cluster, the connection gets disconnected after every 30 seconds. This issue is caused by the default timeoutSec value of 30 seconds in the backendConfig.

Solution:

To resolve this issue, you can increase the timeoutSec value in the backendConfig and apply the configuration to the Devtron service. Here are the steps to do this:
1. Create a BackendConfig yaml file with the increased timeoutSec value. For example:
  1. apiVersion: cloud.google.com/v1beta1
  2. kind: BackendConfig
  3. metadata:
  4.   name: devtron-backendconfig
  5. spec:
  6.   timeoutSec: 1800

you can adjust the timeoutSec value in the backendConfig as per your specific requirement. This value determines the maximum amount of time the load balancer should wait for a response from the backend before timing out. You can set the timeoutSec value to a higher or lower value based on your use case and the response time of your backend.
2. Apply the BackendConfig to the GKE cluster using the following command:
  1. kubectl apply -f <path-to-backendconfig.yaml> -n devtroncd
3. Add the cloud.google.com/backend-config: '{"default": "devtron-backendconfig"}' annotation to the Devtron service with the BackendConfig name. For example:
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4.   name: devtron-service
  5.   namespace: devtroncd
  6.   annotations:
  7.      cloud.google.com/backend-config: '{"default": "devtron-backendconfig"}'
4. Save the changes to the Devtron service configuration.
With these configuration changes, the Devtron dashboard connection should no longer timeout after 30 seconds, allowing for a more stable and consistent connection.