This isn’t much of a post, but I suspect some people will find it useful =).
If your laptop is acting as if your function key is always held down; e.g. the F1-F12 keys do the special action (change volume, or whatever) instead of their normal purpose, then try Hold Fn + Esc and, depending on your model, it may disable the “Function Key Lock”.
On my laptop this actually shows a picture of a lock with the letters Fn within it to indicate it locks the function key as on. But I didn’t see that in advance and had to google more than I would have liked to figure it out.
SSH technically works the same anywhere, but on Windows without special tooling, using SSH can be cumbersome as the CLI is not very… elegant? Generally, on Windows, people use tools like putty or MRemoteNG (also putty based) to make things neater.
If you’re on Linux, you can use SSH out of the box very cleanly by leveraging the config file to create named hosts.
For example, this verbose command:
ssh -i ~/.ssh/prod-key.pem firstname.lastname@example.org
Can be replaced by the following command – and the nice “pgadmin-prod” name even auto-completes. So, if you have 100 servers for different things, you can still find them easily.
This works if you add the following block into your ~/.ssh/config file.
- Host = the user-friendly name I want to use for this connection.
- User = the user I normally have to log in as.
- HostName = the IP address of the target host.
- IdentityFile = the path to the private key used for the connection.
You can have as many named hosts as you like and, again, their names will auto complete after the ssh command – so they’re very easy to use.
This gets even more effective if you combine it with a screen/session management app like tmux or screen. So, I recommend you look into those too if you don’t use them already (tmux is a little more modern if you’re a new to both).
I hope this helps you be a little more efficient, and thanks for reading.
Here are some useful commands for managing pods within a given namespace.
List Pods in Namespace “qaas”
This will show you all the available pods in the given namespace.
$> kubectl get pods -n qaas
NAME READY STATUS RESTARTS AGE
dapper-kudu-pgadmin-694bdf8c7f-ljcc4 1/1 Running 0 9h
Get Logs for Pod
After finding the pod name, you can view its logs centrally from kubernetes which is very cool.
$> kubectl logs dapper-kudu-pgadmin-694bdf8c7f-ljcc4 -n qaas
::ffff:10.237.183.230 - - [01/Nov/2019:13:18:26 +0000] "GET / HTTP...
::ffff:10.237.183.230 - - [01/Nov/2019:13:18:26 +0000] "GET /login?...
Exec Into Pod And Run a Shell
This will let you get into the pod with a shell (like BASH) so that you can look around and see what’s going on.
$> kubectl exec -it dapper-kudu-pgadmin-694bdf8c7f-ljcc4 /bin/sh -n qaas