A collection of some of my useful Kubernetes Tips and Tricks.
If the normal way of deleting a CRD does not work, ie:
kubectl delete crd/<CRD_NAME>
Try the following instead:
Auto-Completion for Kubectl allows you to set up an alias for kubectl on bash cli.
Auto-completion can be very useful to avoid having to reference a cheat sheet constantly when using kubectl commands to interact with your Kubernetes cluster.
Benefits:
Generate a SSH key:
ssh-keygen -t ed25519 -C "your_email@example.com"
OR
For legacy system that doesn't support the Ed25519 algorithm:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Plant the Public key for:-
Screen or GNU Screen is a terminal multiplexer. In other words, it means that you can start a screen session and then open any number of windows (virtual terminals) inside that session. Processes running in Screen will continue to run when their window is not visible even if you get disconnected.
screen -S <session_name>
screen -list
curl
to get the JSON response for the latest releasegrep
to find the line containing file URLcut
and tr
to extract the URLwget
to download itcurl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
https://nip.io is a dead simple wildcard DNS for any IP Address without any registration.
nip.io maps <anything>[.-]<IP Address>.nip.io
to .
Can be useful for application deployments with apache/nginx.
To give URL for your ip 192.168.0.1, you can have the following URLs:
Playbook Keywords: https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html
Return Values: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html
Special Variables: https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html
Variable | Output |
---|
This guide will show you how to generate certificate signing request (CSR) file in Linux system.
The CSR file generated will be sent and signed by the CA server.
Subject Alternative Name (SAN) is required by chromium-based browers such as Chrome or Microsoft Edge.
Without SAN, chromium-based browers will still display the SSL error: ERR_CERT_COMMON_NAME_INVALID.
Generate client private key:
openssl genrsa -out myhost.example.com.key 2048