![](/img/trans.png)
[英]How to resize K8s cluster with kops, cluster-autoscaler to dynamically increase Masters
[英]How to fix ''could not find Image for “kope.io/k8s…” when running kops update cluster ${NAME} --yes
我正在AWS上設置kubernetes集群。 我運行以下命令來創建集群,並在運行最終命令時失敗, kops update cluster
vim ~/.aws/config
添加以下文本
[default]
region = eu-west-2
kops delete cluster --name ${CLUSTER_NAME} --yes
export CLUSTER_NAME=example-1-kops1.k8s.local
export REGION=eu-west-2
export AWS_AVAILABILITY_ZONES=eu-west-2b
export KUBERNETES_VERSION=v1.14.1
export KOPS_STATE_STORE=s3://example-1-com-state-store
export KOPS_STATE_STORE_S3=example-1-com-state-store
aws ec2 describe-availability-zones --region $REGION
aws s3api create-bucket --bucket $KOPS_STATE_STORE_S3 --create-bucket-configuration LocationConstraint=$REGION
aws s3api put-bucket-versioning --bucket $KOPS_STATE_STORE_S3 --versioning-configuration Status=Enabled
kops create cluster --name=$CLUSTER_NAME \
--state=$KOPS_STATE_STORE --zones=$AWS_AVAILABILITY_ZONES \
--node-count=2 --node-size=t2.micro --master-size=t2.micro \
--ssh-public-key ~/.ssh/id_rsa-example-1.pub
kops update cluster ${CLUSTER_NAME} --yes
錯誤信息
error running task "LaunchConfiguration/nodes.example-1-kops1.k8s.local" (9m57s remaining to succeed): could not find Image for "kope.io/k8s-1.12-debian-stretch-amd64-hvm-ebs-2019-05-13"
W0514 01:23:03.908405 21889 executor.go:130] error running task "LaunchConfiguration/master-eu-west-2b.masters.example-1-kops1.k8s.local" (9m57s remaining to succeed): could not find Image for "kope.io/k8s-1.12-debian-stretch-amd64-hvm-ebs-2019-05-13"
歡迎使用StackOverflow。 它看起來像所有者383156758163(別名kope.io)的圖像存儲庫的間歇性問題。
在您創建KOPS集群時,任何AWS區域中都不存在'kope.io/k8s-1.12-debian-stretch-amd64-hvm-ebs-2019-05-13'圖像。 我驗證了它:
aws ec2 describe-images --owner 383156758163 --filters 'Name=name,Values=k8s-*-debian-stretch*' | grep k8s-1.12-debian-stretch-amd64
更新 :
圖像現在出現在describe-images的輸出中:
"ImageLocation": "383156758163/k8s-1.12-debian-stretch-amd64-hvm-ebs-2019-05-13",
"Name": "k8s-1.12-debian-stretch-amd64-hvm-ebs-2019-05-13",
"ImageLocation": "383156758163/k8s-1.12-debian-stretch-amd64-hvm-ebs-2019-05-14",
"Name": "k8s-1.12-debian-stretch-amd64-hvm-ebs-2019-05-14",
看看Image的CreationDate:“2019-05-14T08:57:47.000Z”
請再試一次,現在應該工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.