kb Handle files with very long names in Windows Yesterday I stumbled upon a problem that is quite unusual: a user has been able to download a file with a very long name, and since Windows can only handle path of 259 characters for files it was impossible to delete or rename the file. I tried in cmd to
linux Download a certificate from a web page via CLI I wanted to download the Certificate from a Kubernetes API Server, so I thought to download it from the https page, but then I have to use it in the CLI, so I searched a way to do it all from bash, this is what I found: openssl s_client
talos Resize additional disks in Siderolabs Talos Linux "Talos will automatically resize the system disk partition(s) if the underlaying block size changes, but not user-managed disks. You would need to schedule a privileged pod with the host /dev/ mounted (kubectl debug node/<name> can do this for you) and use xfs_growfs to expand
kb List all resources in a namespace A couple of times I needed to check what resources where still in a namespace, to understand why the namespace was still deleting after a while. The kubectl get all -n namepace-name does not show all the resources so I found in internet this clever little command to show everything:
k8s Port-Forward Kubernetes service or pod port to local port You often need to troubleshoot an application and one of the first step is to port-forward the container (or the service) to check if it's working cerrectly: kubectl port-forward pod/mypod 8888:5000 Or to port-forward a service: kubectl --namespace default port-forward service/default-svc 8080:80 Other examples:
gitops Helm Debugging Especially using GitOps and Helm Charts with ArgoCD it took me a while to understand how to check the manifests resulting from templating. First you have to be in the folder containing the Halm Chart, then you have to build the dependencies: helm dependency build . Then you can generate locally
kb Rotate GitHub PAT on Flux If your GitHub token is expired and you need to update it these are the steps you need to take: * Delete the auth secret from the cluster with kubectl -n flux-system delete secret flux-system * Re-run flux bootstrap with the same args as the first time Source: https://github.com/fluxcd/
kb Copy ssh GPG keys from Windows to a remote Linux machine In Linux you have ssh-copy-id which is quick and useful: ssh-copy-id [email protected] But how do you copy you ssh keys from your Windows machine to a remote Linux machine? It's a bit more convoluted but you can use: type .ssh\keyfile.pub | ssh user@hostname.
Welcome to my blog! I'm Agostino. I'm a technology addict and music lover. I worked in IT for the last 10 years. I noticed that often I search google for the same trivial things that I need during my job (commands, procedures, ...) so I decided to write them down, along