Deploy failed: error: unable to read certificate-authority


#1

After installing spinnaker is unable to deploy k8s resources using a manifest.

Note that certificate-authority must be a complete path or hal will fail to communicate with k8s.

On halyard host:

/home/halyard/.kube/config.yml

apiVersion: v1
clusters:
- cluster:
    certificate-authority: /home/halyard/.kube/ca-config.pem

After the deployment completes spinnaker is up and running however when I try to deploy a manifest it fails:

Deploy failed: error: unable to read certificate-authority /home/halyard/.kube/ca-config.pem
for devk8s due to open /home/halyard/.kube/ca-config.pem: no such file or directory

The clouddriver pod is failing to communicate with k8s due the missing ca pem:

On spin-clouddriver pod:

/opt/spinnaker/config/clouddriver.yml

kubernetes:
  enabled: true
  accounts:
  - name: dev-kube
    requiredGroupMembership: []
    providerVersion: V2
    permissions: {}
    dockerRegistries: []
    context: devk8s
    configureImagePullSecrets: true
    namespaces:
    - spinnaker
    omitNamespaces: []
    kinds:
    - spinnaker
    omitKinds: []
    customResources: []
    kubeconfigFile: /home/halyard/.hal/default/staging/dependencies/251998983-config.yml
    oauthScopes: []
    oAuthScopes: []
  primaryAccount: dev-kube

The ca pem was not copied over to the pod:

bash-4.4$ find /home/halyard/
/home/halyard/
/home/halyard/.hal
/home/halyard/.hal/default
/home/halyard/.hal/default/staging
/home/halyard/.hal/default/staging/dependencies
/home/halyard/.hal/default/staging/dependencies/..data
/home/halyard/.hal/default/staging/dependencies/251998983-config.yml
/home/halyard/.hal/default/staging/dependencies/..2018_06_11_18_27_46.978242231
/home/halyard/.hal/default/staging/dependencies/..2018_06_11_18_27_46.978242231/251998983-config.yml

#2

Using certificate-authority-data vs certificate-authority should solve this problem