I am new to rancher, and I am currently testing a few things and have a few questions or problems which I simply cannot explain…
-
Can I define a default namespace for a user in Rancher? That when he opens a shell and enters a kubectl command, the defined namespace is used?
-
I have installed Rancher in K8S. If more than 50% of the masters in my cluster go offline, I can no longer reach Rancher… (HTTP Error 500: Internal Server Error) I know that this has something to do with the etcd database but is it possible to work around this so that at least the website is accessible so that I can still read out some info?
-
Why does rancher create a namespace for each user by default? What is the point of this, and can I work around it? Because I don’t want to have 10000000 namespaces one day which are not used at all…
-
If I have a kubectl shell open, then it disconnects after a certain period of time? Is it possible to bypass this or make it last longer, and why is this the case?
-
I know this command, but unfortunately this command does not work because of missing write permissions in the Container/VM…
-
As I wrote, I know about this quorum if I’m not mistaken, but I thought there was a way to open the GUI without a 50% quorum but okay, all right then.
-
Okay, so does that mean that you can’t simply switch off this “function” here either?
-
Okay, I’ll try that right away.
Thank you so far for all your help!
By running watch -n 60 ls -l /dev/null
the session still disconnects. So I’m wondering now if that is kind of a Problem or if it has just to do with that auto. logout after X min.
There is no timeout in the Rancher shell or its connection on the client or server. This is usually from a load balancer, ssl proxy, firewall or other device in the middle timing out.
1 Like
All right, then it has to do something with haproxy which is in front of my rancher installation. But funny is, when I run:
for((i=1;i<=99999999;i+=2)); do echo “test”; done
then the session remains open.
It’s a development choice if deciding that no quorum means it’ll allow read but no write or if it decides to not even answer read due to considering it’s data unknowable in accuracy, I guess etcd took the second approach. Since etcd holds all the data for Kubernetes, I wouldn’t expect much that depends on the Kubernetes API to work without it. If you had a separate container hosting a web app with an ingress and not interacting with the Kubernetes API at all then I could see that working while you don’t have quorum with etcd, but the Rancher UI does a lot querying Kubernetes, so it doesn’t surprise me if it has problems.
If you’re doing a shell loop, I think there’s a while loop as well so you could do a while true sort of thing to not have it eventually die if you’re wanting to wait over a weekend or something. If it’s something network-wise doing it then I could see how a loop would cause interaction from the browser side and keep it alive where watch wouldn’t.
1 Like