2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

k8s自分用チートシート{改}

2
Posted at

用途別に分けて使う(≒遊ぶ)ための記事です。
「コマンドをせっかく見たり覚えても身に付かないなぁ~」
という場合に、自分の経験に照らして覚えやすくする効果も期待しました。
(伝わらない表現があったらごめんなさい、ネタ記事ですのでコメントはお控え下さい)

実行しても当方で責任を負えないコマンドも含まれております、実行は自己責任でどうぞ

Pod

Podがザキで死んでいく様を見るコマンド

kubectl get pod --watch <pod_name> &
kubectl delete pod <pod_name>

「なかまになりたそうにこちらを見ている」Pod達を見つめ続けるコマンド

kubectl get pod -A --watch | awk '$4=="Pending"'

自分達にザラキし続けるPod達を見守るコマンド

kubectl get pod -A --watch | awk '$4=="CrashLoopBackOff"'

Node

ガンガンいきすぎてMPが枯渇したNode達を見守るコマンド

while kubectl describe node -A | awk '($3=="(100%)" && $1=="memory") || $1=="Name:"' ; do sleep 1 ; done

ずっと馬車から出してもらえないNode達を見守るコマンド

while kubectl describe node -A | awk '$3=="(0" || $1=="Name:"' ; do sleep 1 ; done

Cluster

メガンテ

sudo kubeadm reset && reboot
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?