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?
Step 1: Right click on the desktop, and select Personalize option. Step 2: From the left side panel click on Lock Screen and select Screen saver settings. Step 3: From the drop down bar under screen saver select an option. Step 4: Check the box On resume, display logon screen, change the number to 5 in the Wait box.
In the Personalization window that opens click on Screen Saver at the bottom. Click on the little down arrow in the screensaver box and select Screensaver Operations from the menu. Adjust the 'Wait Time' to suit your preference, I have mine set at 15 minutes before kicking in. Now click on Settings.
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.
In the v2.2.0 version (~year 2021) of the default installation (https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml), they use kubernetes-dashboard
as the namespace.
The command would look like this:
kubectl edit deployment kubernetes-dashboard -n kubernetes-dashboard
The change would look like this:
# ... content before...
spec:
containers:
- args:
- --auto-generate-certificates
- --namespace=kubernetes-dashboard
- --token-ttl=0 # <-- add this with your timeout
image: kubernetesui/dashboard:v2.0.0
# ... content after ...
As TJ Zimmerman suggested: 0 = no-timeout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With