◻️赤線のpodを消す方法について
kubectl delete [消したいpod名]を実行しても、ひたすら新規でpodが作成されてしまう。
これを解決するのは、podの削除ではなく、deploymentを消す必要がある
root@rasp-master:/home/pi/wp-hinagata# kubectl get pod
=====================================================================================
NAME READY STATUS RESTARTS AGE
mysql-master-9ndcp 1/1 Running 0 2d
mysql-slave-x7k78 1/1 Running 0 2d
nginx-7c87f569d-8tx2v 1/1 Running 0 2d
nginx-7c87f569d-bn9fj 1/1 Running 0 2d
nginx-7c87f569d-d267t 1/1 Running 0 2d
nginx-7c87f569d-wcg9x 1/1 Running 0 2d
nginx-7c87f569d-xdkgx 1/1 Running 0 2d
wordpress-deployment-7886dfcf5d-bz4lb 0/2 ContainerCreating 0 7s
=====================================================================================
◻️deploymentsの状況を確認する。
root@rasp-master:/home/pi/wp-hinagata# kubectl get deployments
====================================================================================
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
nginx 5 5 5 5 2d
wordpress-deployment 1 1 1 0 1d
====================================================================================
◻️deploymentの削除を実行する。
root@rasp-master:/home/pi/wp-hinagata# kubectl delete deployment wordpress-deployment
deployment "wordpress-deployment" deleted
◻️実行後、対象のpod(wordpress-deployment)が消えていることが分かる。
root@rasp-master:/home/pi/wp-hinagata# kubectl get pod
====================================================================================
NAME READY STATUS RESTARTS AGE
mysql-master-9ndcp 1/1 Running 0 2d
mysql-slave-x7k78 1/1 Running 0 2d
nginx-7c87f569d-8tx2v 1/1 Running 0 2d
nginx-7c87f569d-bn9fj 1/1 Running 0 2d
nginx-7c87f569d-d267t 1/1 Running 0 2d
nginx-7c87f569d-wcg9x 1/1 Running 0 2d
nginx-7c87f569d-xdkgx 1/1 Running 0 2d
====================================================================================
0 件のコメント:
コメントを投稿