[英]ImagePullBackOff: Back-off pulling image "argoproj/argosay:v2"
我已經在 AWS EKS 上配置了 Argo 工作流。 EKS 托管在私人 su.net 上,即無法訪問 inte.net。
// 工作流控制器
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
namespace: argo
spec:
selector:
matchLabels:
app: workflow-controller
template:
metadata:
labels:
app: workflow-controller
spec:
containers:
- args:
- --configmap
- workflow-controller-configmap
- --executor-image
- <aws_account_no>.dkr.ecr.eu-central-1.amazonaws.com/argoworkflow:argoexec-v3.4.4
command:
- workflow-controller
env:
- name: LEADER_ELECTION_IDENTITY
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
image: <aws_account_no>.dkr.ecr.eu-central-1.amazonaws.com/argoworkflow:workflow-controller-3.4.4
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 6060
initialDelaySeconds: 90
periodSeconds: 60
timeoutSeconds: 30
name: workflow-controller
ports:
- containerPort: 9090
name: metrics
- containerPort: 6060
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
nodeSelector:
kubernetes.io/os: linux
priorityClassName: workflow-controller
securityContext:
runAsNonRoot: true
serviceAccountName: argo
// Argo 服務器部署文件
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-server
namespace: argo
spec:
selector:
matchLabels:
app: argo-server
template:
metadata:
labels:
app: argo-server
spec:
containers:
- args:
- server
env: []
image: <aws_account_no>.dkr.ecr.eu-central-1.amazonaws.com/argoworkflow:argocli-v3.4.4
name: argo-server
ports:
- containerPort: 2746
name: web
readinessProbe:
httpGet:
path: /
port: 2746
scheme: HTTPS
initialDelaySeconds: 10
periodSeconds: 20
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
volumeMounts:
- mountPath: /tmp
name: tmp
nodeSelector:
kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
serviceAccountName: argo-server
volumes:
- emptyDir: {}
name: tmp
沒有其他變化。
我能夠使用我的 ECR 圖像運行工作流程,但是當我運行 steps/DAG 時,它會給出錯誤消息。 因為在后台它正在通過 inte.net 搜索 argoproj/argosay:v2 圖像,即 docker。但由於它托管在私人 su.net 中,因此無法找到該圖像。
有沒有辦法將此圖像上傳到 aws ECR(私有存儲庫)並在安裝過程中引用該圖像(install.yaml)?
拉取鏡像,標記它,將它推送到您的私有注冊表。 但是,您需要從某個地方訪問您的私有注冊表。
docker pull imagename
docker tag imagename registryUrl/imagename
docker push registry/imagename
在您的部署中使用:
image: registryUrl:imageName
現在您的部署將嘗試訪問您的注冊表,該注冊表應受密碼保護。
使用用戶名和密碼在部署運行的命名空間中創建一個秘密。
然后使用秘密:
containers:
- name: my-container
image: registryUrl/myimage
imagePullSecrets:
- name: regcred # name of the secret you created
整個過程描述在這里
如果您絕對無法訪問 inte.net 來拉/推圖像,還有另一種可能性。
docker image save myimage -o filename
這將創建一個包含圖像的文件,您可以傳輸該文件,然后您可以從該文件重新創建圖像:
docker image import file
如果這對您來說是一個選項,請點擊 docker 文檔的鏈接。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.