我按照本教程设置Kubernetes
https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app
我没有使用教程中的hello项目,而是从自己的Docker存储库下载了一个映像。这是卡桑德拉的照片
docker pull manuchadha25/codingjedi:3.11.4图像是可用的(在Google控制台上检查)
manuchadha25@cloudshell:~ (copper-frame-262317)$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
manuchadha25/cassandra 3.11.4 ca795bbd8fd7 8 months ago 324MB
manuchadha25@cloudshell:~ (copper-frame-262317)$现在我想将映像推送到Container (我认为这是Google自己的注册中心,Kubernetes使用它来创建具有所需图像的新节点)。当我试图推送图像时,我得到了这个错误。
manuchadha25@cloudshell:~ (copper-frame-262317)$ docker push gcr.io/${PROJECT_ID}/manuchadha25/cassandra:3.11.4
The push refers to repository [gcr.io/copper-frame-262317/manuchadha25/cassandra]
An image does not exist locally with the tag: gcr.io/copper-frame-262317/manuchadha25/cassandra
manuchadha25@cloudshell:~ (copper-frame-262317)$我做错了什么?
发布于 2020-06-23 06:54:18
如果您想要从GCR加载对接者映像,则需要添加带有GCR标记的图像版本。
首先阅读以下内容:码头标签
事情是这样的。如果您只是想运行您的码头形象,您可以这样做。没有必要将您的图像推送到GCR。
通过运行docker pull manuchadha25/cassandra:3.11.4,您可以从码头枢纽中提取图像。你只要做这个就行了。如果你真的需要把你的对接者形象推到你的项目的GCR中,你必须告诉对接者GCR“生活在哪里”。
这是通过将图像标记到GCR上来完成的。GCR的标签有三个不同的部分。
注册位置:项目ID
gcr.io \x\x{所有的}\卡桑德拉\x{}
所以,在你的例子中,你会运行:
docker tag manuchadha25/cassandra:3.11.4 gcr.io/${whateveryouridis}/cassandra:3.11.4
超过:
docker push gcr.io/${whateveryouridis}/cassandra:3.11.4
,但我不能强调这一点,
您可以这样做,但您似乎只想在GC k8s中运行您的码头映像。试试docker run manuchadha25/cassandra:3.11.4吧。
https://stackoverflow.com/questions/62528628
复制相似问题