Skip to content

Useful Commands

Kerberos

kinit

kinit -kt <keytab> <principal>
Example:
kinit -kt /etc/security/keytab/namenode.keytab hdfs/namenode.company.bigdata.svc.cluster.local@HOMELDAP.ORG

klist

Show current user kerberos ticket:

klist
Show existing kerberos keytab details:
klist -kte <keytab>

ktutil

Creating new keytab:

ktutil
add_entry -password -p hdfs/namenode.company.bigdata.svc.cluster.local@HOMELDAP.ORG -k 1 -e aes128-cts-hmac-sha1-96
add_entry -password -p hdfs/namenode.company.bigdata.svc.cluster.local@HOMELDAP.ORG -k 1 -e aes256-cts-hmac-sha1-96
add_entry -password -p hdfs/namenode.company.bigdata.svc.cluster.local@HOMELDAP.ORG -k 1 -e aes128-cts-hmac-sha256-128
add_entry -password -p host/namenode.company.bigdata.svc.cluster.local@HOMELDAP.ORG -k 1 -e aes128-cts-hmac-sha1-96
add_entry -password -p host/namenode.company.bigdata.svc.cluster.local@HOMELDAP.ORG -k 1 -e aes256-cts-hmac-sha1-96
add_entry -password -p host/namenode.company.bigdata.svc.cluster.local@HOMELDAP.ORG -k 1 -e aes128-cts-hmac-sha256-128
wkt ./files/namenode.keytab

Kubernetes

Containerd prune unused images

export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml
/var/lib/rancher/rke2/bin/crictl rmi --prune

Linux

Disable SELINUX

sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config && sudo setenforce 

Disable firewalld

systemctl disable --now firewalld

Set systemd timeout

sed -i '/^#DefaultTimeoutStopSec=/c\DefaultTimeoutStopSec=10s' /etc/systemd/system.conf /etc/systemd/user.conf && sudo systemctl daemon-reexec

Longhorn Packages

dnf install nfs-utils iscsi-initiator-utils cryptsetup device-mapper

Extend root path size without restart(/dev/vda2)

qemu-img resize disk.qcow2 +10G
parted /dev/vda
resizepart 2 100%
pvresize /dev/vda2
lvdisplay
lvextend -r -l +100%FREE /dev/mapper/rl-root
lsblk