macOS, ip-address

  • ipconfig getifaddr en0

kubectl

  • kubectl logs --namespace name_space svc_name -f
  • kubectl set env deployment/name_of_service ENV_VAR="value" --namespace=the_best
  • delete --all deployments --namespace=default
  • kubectl describe service --all-namespaces | grep -i nodeport

kubectl - nuking namespaces

kubectl proxy (in one window) and:

kubectl get ns delete-me -o json | \
jq '.spec.finalizers=[]' | \
curl -X PUT http://localhost:8001/api/v1/namespaces/delete-me/finalize -H "Content-Type: application/json" --data @-

from: stackoverflow)

minikube

  • minikube service

chmod

  • chmod -R 701 ./* (add all permissions to all files)

ssh & scp

  • scp remote_user@remote_ip_or_host:/path/to/file.zip . (on local)
  • ssh-copy-id -i ~/.ssh/<ssh_key_name>.pub remote_user@remote_ip_or_host
  • scp "remote_user@remote_ip_or_host:/remote/directory/*.zip" ./local/directory/

Docker

  • DOCKER_BUILDKIT=0 docker build . (stackoverflow)
  • docker run -it --entrypoint /bin/bash [docker_image] (overwrite entrypoint of the docker file, rn container interactively)
  • docker build -f sub/directory/Dockerfile . -t "image_name"
  • docker pull ghcr.io/helmfile/helmfile:latest && docker image history docker pull ghcr.io/helmfile/helmfile:latest

iTerm / Bash

  • cat .bash_history
  • ctrl + r

Helm

  • helm upgrade chart_name chart_dir/ --install

pip

  • pip show <package_name> to let pip show you where a package is installed

brew

  • brew list --formula | xargs brew info | egrep --color '\d*\.\d*(KB|MB|GB)' (stackoverflow)

medium posts

https://scribe.rip/