Spinnaker - Kubernetes - 找不到 docker 个容器
Spinnaker - Kubernetes - Can't find docker containers
我已经按照手册中的建议安装了 spinnaker 和 kubernetes https://www.spinnaker.io/guides/tutorials/codelabs/kubernetes-source-to-prod/
问题是,在手册的第 3 步中,我似乎无法通过 Spinnaker 在 Docker Hub 上访问我的 docker 容器。
这是我的spinnaker.yml(相关部分):
kubernetes:
# For more information on configuring Kubernetes clusters (kubernetes), see
# http://www.spinnaker.io/v1.0/docs/target-deployment-setup#section-kubernetes-cluster-setup
# NOTE: enabling kubernetes also requires enabling dockerRegistry.
enabled: ${SPINNAKER_KUBERNETES_ENABLED:true}
primaryCredentials:
# These credentials use authentication information at ~/.kube/config
# by default.
name: euwest1.aws.crossense.io
dockerRegistryAccount: ${providers.dockerRegistry.primaryCredentials.name}
dockerRegistry:
# For more information on configuring Docker registries, see
# http://www.spinnaker.io/v1.0/docs/target-deployment-configuration#section-docker-registry
# NOTE: Enabling dockerRegistry is independent of other providers.
# However, for convienience, we tie docker and kubernetes together
# since kubernetes (and only kubernetes) depends on this docker provider
# configuration.
enabled: ${SPINNAKER_KUBERNETES_ENABLED:true}
primaryCredentials:
name: crossense
address: ${SPINNAKER_DOCKER_REGISTRY:https://index.docker.io/}
repository: ${SPINNAKER_DOCKER_REPOSITORY:crossense/gator}
username: crossense
# A path to a plain text file containing the user's password
password: password #${SPINNAKER_DOCKER_PASSWORD_FILE}
提前谢谢大家的帮助:)
Spinnnaker 的配置非常棘手。我不知道你的问题是什么,但我建议你使用 helm chart 设置 spinnaker,它为你抽象了所有配置和部署
https://github.com/kubernetes/charts/tree/master/stable/spinnaker
可能是 copy/paste 错误,但您的 kubernetes.enabled
和 dockerRegistry.enabled
看起来缩进错误。
我认为问题在于 docker 注册表不提供索引服务。因此,您需要提供您希望可用的所有图像的列表。
dockerRegistry:
enabled: true
accounts:
- name: spinnaker-dockerhub
requiredGroupMembership: []
address: https://index.docker.io
username: username
password: password
email: fake.email@spinnaker.io
cacheIntervalSeconds: 30
repositories:
- library/httpd
- library/python
- library/openjrd
- your-org/your-image
primaryAccount: spinnaker-dockerhub
执行此操作的升降索commands是:
export ACCOUNT=spinnaker-dockerhub
hal config provider docker-registry account edit $ACCOUNT --repositories [library/httpd, library/python]
hal config provider docker-registry account edit $ACCOUNT --add-repository library/python
这将更新您的升降索配置文件,等待部署。
请注意,如果您无法访问其中一张图片,该命令可能会失败。
我已经按照手册中的建议安装了 spinnaker 和 kubernetes https://www.spinnaker.io/guides/tutorials/codelabs/kubernetes-source-to-prod/
问题是,在手册的第 3 步中,我似乎无法通过 Spinnaker 在 Docker Hub 上访问我的 docker 容器。
这是我的spinnaker.yml(相关部分):
kubernetes:
# For more information on configuring Kubernetes clusters (kubernetes), see
# http://www.spinnaker.io/v1.0/docs/target-deployment-setup#section-kubernetes-cluster-setup
# NOTE: enabling kubernetes also requires enabling dockerRegistry.
enabled: ${SPINNAKER_KUBERNETES_ENABLED:true}
primaryCredentials:
# These credentials use authentication information at ~/.kube/config
# by default.
name: euwest1.aws.crossense.io
dockerRegistryAccount: ${providers.dockerRegistry.primaryCredentials.name}
dockerRegistry:
# For more information on configuring Docker registries, see
# http://www.spinnaker.io/v1.0/docs/target-deployment-configuration#section-docker-registry
# NOTE: Enabling dockerRegistry is independent of other providers.
# However, for convienience, we tie docker and kubernetes together
# since kubernetes (and only kubernetes) depends on this docker provider
# configuration.
enabled: ${SPINNAKER_KUBERNETES_ENABLED:true}
primaryCredentials:
name: crossense
address: ${SPINNAKER_DOCKER_REGISTRY:https://index.docker.io/}
repository: ${SPINNAKER_DOCKER_REPOSITORY:crossense/gator}
username: crossense
# A path to a plain text file containing the user's password
password: password #${SPINNAKER_DOCKER_PASSWORD_FILE}
提前谢谢大家的帮助:)
Spinnnaker 的配置非常棘手。我不知道你的问题是什么,但我建议你使用 helm chart 设置 spinnaker,它为你抽象了所有配置和部署
https://github.com/kubernetes/charts/tree/master/stable/spinnaker
可能是 copy/paste 错误,但您的 kubernetes.enabled
和 dockerRegistry.enabled
看起来缩进错误。
我认为问题在于 docker 注册表不提供索引服务。因此,您需要提供您希望可用的所有图像的列表。
dockerRegistry:
enabled: true
accounts:
- name: spinnaker-dockerhub
requiredGroupMembership: []
address: https://index.docker.io
username: username
password: password
email: fake.email@spinnaker.io
cacheIntervalSeconds: 30
repositories:
- library/httpd
- library/python
- library/openjrd
- your-org/your-image
primaryAccount: spinnaker-dockerhub
执行此操作的升降索commands是:
export ACCOUNT=spinnaker-dockerhub
hal config provider docker-registry account edit $ACCOUNT --repositories [library/httpd, library/python]
hal config provider docker-registry account edit $ACCOUNT --add-repository library/python
这将更新您的升降索配置文件,等待部署。
请注意,如果您无法访问其中一张图片,该命令可能会失败。