Posts

Kubernetes readiness probe

In some situations an application being deployed to Kubernetes may return an error such as  Readiness probe failed: net/http: request canceled (Client.Timeout exceeded while awaiting headers) Most likely you'd see an error like that from checking a deployment of an application e.g.  kubectl rollout history deployment/application The readiness probe needs to succeed for the pod to be added as an endpoint for the service exposing it. 1) kubectl get po -o wide This is so you can get the pod's cluster IP 2) kubectl exec -t [another_pod] -- curl -I [pod's cluster IP] If you get a 200 response, you know the path is configured properly and the readiness probe should be passing. If you get anything other than a 200 response, this is why the readiness probe fails and you need to check your image.

Disable WSL shell beeps in Windows

Set bell-style none in ~/.inputrc to silence all shell beeps. This stops the annoying tones if you attempt to tab-complete under WSL(2) in Windows 10

AD runas admin

Target: %SystemRoot%\system32\runas.exe /user:DOMAIN\user-admin "cmd /c Start /B mmc.exe %SystemRoot%\system32\dsa.msc Start in: %WinDir%\system32 

Linux stress testing

sudo apt-get install stress sudo stress --cpu 4 --io 4 --timeout 30

Powershell to retrieve networked computer's installed programs

Get-CimInstance -ComputerName PC-NAME -ClassName win32_product -ErrorAction SilentlyContinue| Select-Object PSComputerName, Name, PackageName, InstallDate | Out-GridView

Insights to CPU/RAM usage on Linux using the ps command

To see what processes are running on your machine, sorted by their memory usage, run the following command: ps aux | awk '{print $2 , $4 , $11 }' | sort -k2rn | head -n 15 Similar to the above, but with some headings thrown in: echo [PID] [MEM] [PATH] && ps aux | awk '{print $2 , $4 , $11 }' | sort -k2rn | head -n 15 To view similar but CPU focused, not RAM percentage: ps -eo pcpu,pid,user,args | sort -k 1 -r | head -20