init-containersが使用可能になり、非常に便利であるため、init-containersを使用しています。私のコアイメージ(以下web-dev)はあまり変わっていませんが、私のinit-containerイメージ(以下web-data-dev)は頻繁に変更されます。デプロイメントでinit-containerのコンテナイメージタグの変更が検出されない
init-containerは、バージョン番号のコンテナイメージを使用します。私は最新の値に、このバージョン番号を変更し、kubectlは、例えば-f deployment.yamlに
を適用しない、私はにeu.gcr.io/project/web-data-dev:187を変更しますkubectlを実行する前にeu.gcr.io/project/web-data-dev:188を適用してください。
私はこれを行いますが、デプロイは行われません。init-containerが使用するイメージに変更を加えると、デプロイメントはまだ行われません。これは、init-containerの変更が検出されていないためと思われます。
私は、ちょうどこのように、画像フィールド内のいくつかのゴミを入れてみました:「イメージ」:「thisIsNotAnImage」と再び-f適用kubectl実行されますが、更新はまだ適用されません。
私の質問はです - kubectlを適用して-f initタグの画像タグの変更を検出する方法を教えてください。私は何か間違ったことをしていますか、これはバグですか、これはまだ単純に実装されていないのですか?
完全展開YAMLは以下のとおりです。
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: web-deployment
spec:
replicas: 1
strategy:
rollingUpdate:
maxUnavailable: 0
template:
metadata:
labels:
app: web
tier: frontend
annotations:
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "initialiser1",
"image": "eu.gcr.io/project/web-data-dev:187",
"command": ["cp", "-r", "/data-in/", "/opt/"],
"volumeMounts": [
{
"name": "file-share",
"mountPath": "/opt/"
}
]
}
]'
spec:
containers:
- image: eu.gcr.io/project/web-dev:20
name: web
resources:
requests:
cpu: 10m
memory: 40Mi
ports:
- containerPort: 80
name: http
- containerPort: 443
name: https
volumeMounts:
- name: file-share
mountPath: /opt/
volumes:
- name: file-share
emptyDir: {}
を
bar
にfoo
を変更しようと結果を参照してくださいをありがとう、これは働いた - アルファ版の不具合でなければならない - 歓声! – IaMaCuP