Code Snippet

Just another Code Snippet site

How-to

[How-To] Kubernetes

Install KubeCtl on windows : https://kubernetes.io/fr/docs/tasks/tools/install-kubectl/ Install KubeCtl on CentOS/RHEL Define config file : Create a deployment: Create a service to expose the deployment : Get service info (and LoadBalancer port) : Scale deployment Delete deployment(s) Describe deployment(s) Add private repo to container.d: edit /etc/containerd/config.toml Restart container.d Test a pull using crictl

, , , ,

[Bash] How-To

Create a tar.gz file for each file : Add datetime in bash history : To replace the first occurrence of a pattern with a given string, use ${parameter/pattern/string}: To replace all occurrences, use ${parameter//pattern/string}: Show path in bash prompt Add following line in .bashrc Check keyboard input and call associated function: Script used to ask […]

, , ,

[How-To] SSH

SSH to a machine using an SSH bastion (proxy) for example : and with additional SSH options : —- SSHPass Execure command as ssh (using SSH PASS)

, , ,