Cloud, Applications and Software Engineering
Mostly this part of my blog is helpful tips and reminders for myself.. perhaps you will find it useful too.
K8s Node Sizing & Pod Sizes
Getting tripped up by having a pod unable to be scheduled due to resource constrains is a pain, and in my world often a result of mis-configuration rather than a real constraint. Especially when considering VM backed K8S clusters.
kubectl describe node / kubectl describe pod / kubectl describe deployment
get the details of the various constraints and map them back to VM configuration. Remember to let the hypervisor do its magic with resource management on the physical hardware and not double the 'reservation headroom' by allowing 20% cpu overhead on the VM then on the K8S cluster.
SSH Keys & Agents MacOS
I'm always forgetting how to setup SSH key auth on MacOS. Once I've noted it down here I doubt I'll forget it again.
Generating a new SSH key
$ ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org"
This is create both the public and private key pair, using the email address as a label (its just a label doesn't have to be a valid email address). Provide a passphrase for access (no not - in which case secure your private key another way).
Adding SSH Key to ssh-agent - MacOS Specific
You need to create (it doesn't exist by detail) the ~/.ssh/config to load the created keys in and store both the keys and passphrase into MacOS key store.
IdentityFile ~/.ssh/id_rsa <-- This is the public key of the pair
Add the SSH private key to the ssh-agent and keychain with ssh-add -K ~/.ssh/id_rsa
use ssh-copy-id email@example.com to copy the public key to the desired host. This will add the key to the host machines '~/.ssh/authorizd_keys' file -- and as if by magic you no longer need to provide you password to connect from you trusted host machine.
Cleaning Up Docker
Like most people who use Docker a lot I end up with fairly large collections images, networks and volumes that need cleaning up especially when things aren't working the way they should.
Here's my reminder of how :
docker system prune -a
Cleans out stopped containers and unused images alongside the networks and volumes that may have been defined.
Current Useful Links
Helpful places on the internet mostly for my memory.. perhaps useful to others.
BitFusion - ML & GPU's
Quick overview of the VMWare Bitfusion technology and how it can scale across multiple K8S nodes sharing GPU resources. Very cool stuff.
About.. well me.
Emerging Technology, Photography, Scuba Diving and Software Engineering.. that's me.
Grew up on ZX Spectrums, Amstrad 464's, Commodore Amiga's, X86 Linux and PowerPC Mac's... I've always been a computer nerd.. then it became my job.. the best job in the world*
*I suspect there are better more fulfilling jobs.. I just don't look up from the keyboard long enough to notice them.