- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Apache Airflow 的 KubernetesPodOperator
从私有(private)存储库中提取 docker 镜像?KubernetesPodOperator
有一个 image_pull_secrets
您可以通过 Secrets
对象与私有(private)存储库进行身份验证。但是 secrets 对象只能表示一个环境变量或一个卷 - 这两者都不符合我对 Kubernetes 如何使用 secret 对私有(private) repos 进行身份验证的理解。
使用 kubectl
您可以使用类似的东西创建所需的 secret
$ kubectl create secret docker-registry $SECRET_NAME \
--docker-server=https://${ACCOUNT}.dkr.ecr.${REGION}.amazonaws.com \
--docker-username=AWS \
--docker-password="${TOKEN}" \
--docker-email="${EMAIL}"
最佳答案
有secret
带有 docker-registry
的对象根据 Kubernetes 输入 documentation可用于对私有(private)存储库进行身份验证。
正如您在问题中提到的那样;您可以使用 kubectl
至创建 docker-registry
的 secret 类型 然后您可以尝试通过 image_pull_secrets
.
但是,根据您使用的平台,可能有 有限或 完全没用根据 kubernetes documentation :
Configuring Nodes to Authenticate to a Private Registry
Note: If you are running on Google Kubernetes Engine, there will already be a
.dockercfg
on each node with credentials for Google Container Registry. You cannot use this approach.Note: If you are running on AWS EC2 and are using the EC2 Container Registry (ECR), the kubelet on each node will manage and update the ECR login credentials. You cannot use this approach.
Note: This approach is suitable if you can control node configuration. It will not work reliably on GCE, and any other cloud provider that does automatic node replacement.
Note: Kubernetes as of now only supports the
auths
andHttpHeaders
section of docker config. This means credential helpers (credHelpers
orcredsStore
) are not supported.
关于kubernetes - Airflow KubePodOperator 从私有(private)仓库拉取镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58293057/
Apache Airflow 的 KubernetesPodOperator从私有(private)存储库中提取 docker 镜像? KubernetesPodOperator有一个 image_p
我是一名优秀的程序员,十分优秀!