Try   HackMD

EKS 上版本到 de2 的 kubectl delete 說明

docker image

vim ~/.bashrc

修改 VERSION 與 TAG 的版本號,例如:1.0.0.7-preview
然後重新開機
讓設定更新

kubectl get po

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

kubectl delete po de2-58f446544-mzh2r

刪除 de2-58f446544-mzh2r 的 de2 自己產生一個新的 po id

kubectl delete po -l app=de2

這個是 kevin 給的指令,同上作用,直接指定 de2 就好,不必記 po id

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

  • 據 pony 與 kevin 的說法
    新生成的 po id 是原本之前存在 ECR 的 image
    如果想同一個 VERSION 版本
    但是 image 內的程式碼不一同
    可以在 ECR 上砍掉目前的 image
    在上傳新的 image 上去
    在用下面的指令
envsubst < de2.yaml | kubectl apply -f -

開啟新的 image 在 EKS 上執行

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

想要完全刪除的話,輸入下面的指令

envsubst < de2.yaml | kubectl delete -f -

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

會出現 delete
再輸入一次

envsubst < de2.yaml | kubectl apply -f -

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

會出現 create
de2 也會出現在 kubectl get po 指令的 po list 裡

參考資料

看 EKS 上 de2 的 Console.WriteLine 的 log

強制 git pull 覆蓋本地檔案

參考:Ubuntu 切換帳號

EKS 參考文件

tags: EKS 工作紀錄