Forum Navigation
You need to log in to create posts and topics.

Kubernetes Resources Links & Useful Commands

Kubernetes Cheatsheet

Here you can find a detailed list of Kubernetes management commands

Kubernetes Cheat sheet

 

Kubespray

Composition of Ansible playbooks, inventory, provisioning tools, and domain knowledge for generic OS/Kubernetes clusters configuration management tasks. Kubespray provides: a highly available cluster. composable attributes. support for most popular Linux distributions.

https://github.com/kubernetes-sigs/kubespray

 

Kubetail

Bash script that enables you to aggregate (tail/follow) logs from multiple pods into one stream. This is the same as running “kubectl logs -f ” but for multiple pods.

https://github.com/johanhaleby/kubetail

Useful Kubernetes Commands

List All Nodes, Namespace, Containers and networking

kubectl get po –all-namespaces -o=jsonpath=”{range .items[*]}{.spec.nodeName}{‘\t’}{.spec.hostNetwork}{‘\t’}{.metadata.namespace}{‘\t’}{.metadata.name}{‘\t’}{.spec.hostNetwork}{‘\t’}{.spec.containers..containerPort}{‘\n’}{end}”

List Containers in Pending state

kubectl get po –all-namespaces -o wide | grep Pending

List Nodes and Ports

kubectl get po –all-namespaces -o=jsonpath=”{range .items[*]}{.spec.nodeName}{‘\t’}{.spec.hostNetwork}{‘\t’}{.spec.hostNetwork}{‘\t’}{.spec.containers..containerPort}{‘\n’}{end}”

List Kubernetes Cluster networking setup

kubectl –namespace kube-system get configmap kubeadm-config -o yaml

Generate Join token for additional workers / control-plane in the cluster

kubeadm token create –print-join-command

Schedule Pods on the control plane nodes

kubectl taint nodes –all node-role.kubernetes.io/control-plane- node-role.kubernetes.io/master-

Check All system Events

kubectl get events

 

Uploaded files:
If you have found my website, guides, articles or videos useful, please buy me a coffee