What's Popular

Meh, Whatever is Featured

Linking Active Directory to Palo Alto

 ###First you need to create a server profile under the LDAP section. DEVICE>Server Profiles>LDAP then click on the Add down at the bo...

Monday, September 12, 2022

Kubernetes Cheat Sheet

 • Check Status of Pods

o kubectl get pods (quick detail)

o kubectl get pods -A (more details)

Check the logs on a pod

o kubectl logs POD_NAME

o kubectl logs POD_NAME CONTAINER_NAM (For pods with multiple containers)

Delete one pod, or selected ones:

o kubectl delete pod YOUR_POD, NEXT_POD

Delete All Pods

o kubectl delete pod --all

Pull evicted pods and then Delete them

o kubectl get pod | grep Evicted | awk '{print $1}' | xargs kubectl delete pod

Get services for each pod (service is the gateway into the pod)

o kubectl get endpoints

Get service endpoints for specific pod:

o kubectl get endpoints YOUR_POD_NAME

Get service cluster IPs for Pods

o kubectl get services

Check the logs for the Kubernetes Startup/Shutdown

o journalctl -u kubelet

Get service information for a specific pod

o kubectl describe service YOUR_SERVICE/POD

Get pod information for specific pod

o kubectl describe YOUR_POD

Find information on your nodes

o kubectl get nodes

get pods under a specific namespace

o kubectl get pods --namespace YOUR_NAMESPACE -A

Update Time and Date Linux

First verify your time by typing in:

o #timedatectl

Set NTP or Disable

o #timedatectl set-ntp yes

o #timedatectl set-ntp no

Set Timezones

o #timedatectl set-timezone UTC

o #timedatectl set-local-rtc 1(YOUR_LOCAL_TIMEZONE)

Change the Clock

o #timedatectl set-time HH:MM:SS

o #timedatectl set-time YYYY-MM-DD

List Timezones

o #timedatectl list-timezones

o #timedatectl list-timezones | grep keyword(Time-Zone)

Set Hardware Clock to Sync with UTC

o #timdatectl set-local-rtc 0

Display the Hardware Clock (Older Ubuntu Versions)

o #sudo hwclock -r

o #sudo hwclock --show

o #sudo hwclock --show --verbose

Display the date and change the date/time (Older Ubuntu Versions)

o #date (display)

o #sudo date -s YY-MM-DD HH:MM:SS