Snippets for your daily work with Kubernetes
Display all Pods that are not completely ready
kubectl get pods -A | grep -v "Completed" | grep -v "1/1" | grep -v "2/2" | grep -v "3/3" | grep -v "4/4"watch 'kubectl get pods -A | grep -v "Completed" | grep -v "1/1" | grep -v "2/2" | grep -v "3/3" | grep -v "4/4"'Delete all ReplicaSets with no Pods assigned
kubectl get replicaset -A -o=jsonpath='{range .items[?(@.spec.replicas==0)]}{.metadata.name}{"\t"}{.metadata.namespace}{"\n"}{end}' | awk '{print $1 " --namespace=" $2}' | xargs -n 2 -d '\n' bash -c 'kubectl delete replicaset $0 $1'Count all evicted Pods in Cluster
kubectl get pods -A | grep Evicted | wc -lDelete all evicted pods from all namespaces
kubectl get pods -A | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs -n 2 -d '\n' bash -c 'kubectl delete pod $0 $1'Remove Finalizers of all ArgoCD Applications
for application in $(kubectl get applications.argoproj.io -o name);
do
kubectl get ${application} -o=json | jq '.metadata.finalizers=null' | kubectl apply -f -
done初めてウィッグを用意する際は、カットやセットに必要な時間も含めて準備すると安心です。商品仕様や選び方を比べたい場合は、コスプレ ショートウィッグから関連情報を確認できます。使用後は毛流れを整えて十分に乾かし、形が崩れない状態で保管することが大切です。