Skip to main content

Posts

Showing posts from September, 2020

Command Line Fu - Small GPG Cheatsheet

GPG is a suite of tools for encrypting and signing messages and files. Working with it on the cli is fairly forward if you get behind it once and of course, it features completion on the command line. NOTE: This is more of a personal cheatsheet which I think might be useful for other people as well. Generate Key $ gpg --gen-key Generate Revocation Cert $ gpg --gen-revoke Export Public Keys $ gpg --export --armor archy@archyslife.lan > archy.archyslife.lan.asc Export Secret Keys $ gpg --export-secret-keys --armor archy@archyslife.lan > archy.archyslife.lan.secret Export Ownertrust $ gpg --export-ownertrust > ownertrust.txt Import Public Keys $ gpg --import archy.archyslife.lan.asc Import Secret Keys $ gpg --import archy.archyslife.lan.secret Import Ownertrust $ gpg --import-ownertrust ownertrust.txt Show fingerprint of a key $ gpg --fingerprint archy@archyslife.lan Upload a key to a keyserver $ gpg --keyserver keys.gnupg.net --send-keys archy@archysli

Kubernetes - Upgrading a cluster using kubeadm

Upgrading a Kubernetes cluster has been made simple with 'kubeadm upgrade' since it does the heavy lifting for you. My setup is fairly simple since it's my homelab with 1 master-node and 2 worker nodes. In order to upgrade, log in to (one of) your master-node(s) and update the kubernetes packages: [archy@kube01 ~]$ tmux new -s kubernetes_upgrade [archy@kube01 ~]$ sudo yum -y update kubeadm kubelet kubectl Once the packages are updated, you can continue to update using kubeadm [archy@kube01 ~]$ sudo kubeadm upgrade plan This will print out the latest version that can be upgraded to. In my case, it is v1.18.8. First, run a dry-run to see if everything would go well or if there are some errors. [archy@kube01 ~]$ sudo kubeadm upgrade apply v1.18.8 --dry-run If everything goes well, run the upgrade. [archy@kube01 ~]$ sudo kubeadm upgrade apply v1.18.8 Note: this might take a while depending on your resource usage. Next, drain the worker node and upgrade it. [arch