How can I make the automatic timed logout longer?

9/19/2019

The web session timeout for Kubernetes Dashboard is pretty short. I can't see any setting or configuration parameter to change it.

I tried inspecting the container contents with kubectl exec, but there does not seem to be any shell (sh, bash, ash, etc.), so I can't see what web server parameters are configured inside.

I would like to make this timeout longer, to make it easier to keep track of job executions for long periods of time.

How can I proceed?

-- metroid2010
kubernetes-dashboard

1 Answer

9/27/2019

There are two ways. When you deploy the manifest originally, this can be done by modifying the Container Args to include this directive: --token-ttl=43200 where 43200 is the number of seconds you want to set the automatic timeout to be.

If you want to manipulate the configuration post-deployment, then you can edit the existing deployment which will trigger the pod to be redeployed with the new arguments. To do this run kubectl edit deployment -n kube-system kubernetes-dashboard and add the argument mentioned above to the args section.

EDIT: If you are using V2 of the Dashboard (Still in beta) then you will need to change the namespace in the command from kube-system to kubernetes-dashboard. (Or somewhere else if you customized it)

EDIT2: You can also set token-ttl to 0 to disable timeouts entirely.

-- TJ Zimmerman
Source: StackOverflow