次のコマンドを使用して、デプロイで実行されるイメージを更新しました。
kubectl --cluster websites --namespace production set image
deployment/mobile-web mobile-web=eu.gcr.io/websites/mobile-web:0.23
本番環境をミラーリングするステージング名前空間を作成するまで、これはうまく機能していました。つまり、デプロイmobile-web
は本番環境とステージング名前空間の両方に存在します。今、私はエラーが発生します:
Error from server: the server could not find the requested resource
(get deployments.extensions mobile-web)
ここで何が欠けていますか?それとも、yaml ファイルまたは JSON ファイルを使用して更新する唯一の方法ですか?これは、CI/CD パイプラインでもう少し作業が必要なことを意味しますか? 名前空間を次のように設定しようとしました:
kubectl config set-context production --namespace=production --cluster=websites
しかし、役に立たない。