[英]Spinnaker with Kubernetes: Not able to connect the docker hub repository
I'm trying to configure the spinnaker to deploy applications in kubernetes environment.我正在尝试配置 spinnaker 以在 kubernetes 环境中部署应用程序。
I followed a documentation , at step-3 the containers are not showing up as shown in the screenshot .我遵循了一个文档,在第 3 步,容器没有如截图所示显示出来。 Then I moved to next step (Pipeline creation), when I select
type: Docker
in the Automated Trigger
, again the Repo name
is not showing up as shown in screenshot .然后我移动到下一个步骤(管道创建),当我选择
type: Docker
在Automated Trigger
,再次Repo name
如图没有显示出来 的屏幕截图。
So, I'm suspecting there is problem with spinnaker and docker hub repo(Authentication/Misconfiguration?)所以,我怀疑 Spinnaker 和 docker hub 存储库存在问题(身份验证/错误配置?)
I have copied the Kubernetes Authentication config file to ~/.kube/config
.我已将 Kubernetes 身份验证配置文件复制到
~/.kube/config
。 I think there is no problem with spinnaker and kubernetes.我认为 Spinnaker 和 kubernetes 没有问题。 When I create a
Load Balancer
in spinnaker I can see Kube Services
are creating (test-dev & test-prod)当我在 spinnaker 中创建
Load Balancer
,我可以看到Kube Services
正在创建(test-dev 和 test-prod)
root@veeru:~# kubectl get services
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 192.168.3.1 <none> 443/TCP 91d
test-dev 192.168.3.113 <none> 80/TCP 6h
test-prod 192.168.3.185 80/TCP 6h
My spinnaker-local.yml
我的
spinnaker-local.yml
<Content removed for brevity>
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: true
primaryCredentials:
# These credentials use authentication information at ~/.kube/config
# by default.
name: veerendrav2
namespace: default
dockerRegistryAccount: veerendrav2
dockerRegistry:
# If you want to deploy containers to a container management solution,
# you must specifiy where these container images exist first.
# 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: true
primaryCredentials:
name: veerendrav2
address: https://hub.docker.com
repository: veerendrav2/spin-kub-demo
<Content removed for brevity>
My /opt/spinnaker/config/clouddriver-local.yml
我的
/opt/spinnaker/config/clouddriver-local.yml
dockerRegistry:
enabled: true
accounts:
- name: veerendrav2
address: https://hub.docker.com/ # Point to registry of choice
username: veerendrav2
password: password
repositories:
- veerendrav2/spin-kub-demo
My Sample application github repo and docker hub repo我的示例应用程序github 存储库和docker hub 存储库
Thanks谢谢
在/opt/spinnaker/config/clouddriver-local.yml
您可能需要将dockerRegistry.accounts[0].address
字段更改为https://index.docker.io
,因为 DockerHub 的注册表未托管在hub.docker.com
,但在index.docker.io
。
The recommended way to configure the docker registry address, or any other configs, is using Halyard .配置 docker 注册表地址或任何其他配置的推荐方法是使用Halyard 。 Modifying the config files directly could result in them getting overwritten.
直接修改配置文件可能会导致它们被覆盖。
You can add an account, or edit an existing one this way.您可以通过这种方式添加帐户或编辑现有帐户。
# Add a docker registry account
hal config provider docker-registry account add <ACCOUNT_NAME> --address https://index.docker.io
# Edit the account(i.e. add a repo)
hal config provider docker-registry account edit grizzthedj --add-repository <ACCOUNT_NAME>/<REPO>
# Deploy the changes
hal deploy apply
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.