问题:采用helm安装spinnaker,部署成功,最终发现并不能创建servergroup。
分析:查看clouddriver的启动日志,报找不到/root/.kube/config文件
解决:把集群的admin用户的.kube/config打到clouddriver镜像里,亦或者创建新的用户给spinnaker使用。
注意:问题解决后,创建pipeline的时候找不到dockerhub下的镜像去触发。这个时候需要把镜像仓库地址镜像名注册到clouddriver配置文件中。如:
clouddriver-local.yml:
server:
port: ${services.clouddriver.port:7002}
address: 0.0.0.0
default:
account:
env: ${providers.kubernetes.primaryCredentials.name}
kubernetes:
enabled: true
accounts:
- name: default
serviceAccount: true
providerVersion: v1
dockerRegistries:
- accountName: dockerhub
dockerRegistry:
enabled: true
accounts:
- name: dockerhub
address: https://registry.gcloud.srcb.com:443
insecureRegistry: true
repositories:
- cloudpi/potal-frontend
- cloudpi/potal-backend
credentials:
primaryAccountTypes: ${providers.kubernetes.primaryCredentials.name}
challengeDestructiveActionsEnvironments: ${providers.kubernetes.primaryCredentials.name}
或者在spinnaker value传参文件里传进去。如:
accounts:
- name: dockerhub
address: https://registry.gcloud.srcb.com:443
insecureRegistry: true
repositories:
- cloudpi/potal-frontend
- cloudpi/potal-backend