Installing Spinnaker on EKS


#1

I’m installing Spinnaker via Halyard on a EKS (AWS) cluster that was created by our IT team with their cloudformations.
This cluster have a limited namespaces, and I have a kubeconfig to access to a single namespace called “tdc-apps”.
So, I configured with halyard:

  • kubernetes v2 account
  • distributed installation
  • S3 storage (already created too)
  • last version available
hal config provider kubernetes enable
hal config provider kubernetes account add spinnaker-account --provider-version v2 --context tdc-apps --kubeconfig-file ~/.hal/kube/config_apps-user
hal config provider kubernetes account edit spinnaker-account --add-namespace tdc-apps
hal config features edit --artifacts true
hal config deploy edit --type distributed --account-name spinnaker-account
hal config storage s3 edit --bucket s3-spinnaker --root-folder front50 --access-key-id xxxxxx --secret-access-key
hal config storage edit --type s3
hal version list
hal config version edit --version 1.9.4
hal deploy apply

I got this error:

com.netflix.spinnaker.halyard.core.error.v1.HalException: Failed check for Namespace/spinnaker in null
Error from server (Forbidden): namespaces "spinnaker" is forbidden: User "system:serviceaccount:tdc-apps:apps-user" cannot get namespaces in the namespace "spinnaker"


        at com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.kubernetes.v2.KubernetesV2Utils.exists(KubernetesV2Utils.java:101) ~[halyard-deploy-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.kubernetes.v2.KubernetesV2Utils.exists(KubernetesV2Utils.java:62) ~[halyard-deploy-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at com.netflix.spinnaker.halyard.deploy.deployment.v1.KubectlDeployer.lambda$deploy$0(KubectlDeployer.java:69) ~[halyard-deploy-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_181]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_181]
        at com.netflix.spinnaker.halyard.deploy.deployment.v1.KubectlDeployer.deploy(KubectlDeployer.java:45) ~[halyard-deploy-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at com.netflix.spinnaker.halyard.deploy.deployment.v1.KubectlDeployer.deploy(KubectlDeployer.java:37) ~[halyard-deploy-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at com.netflix.spinnaker.halyard.deploy.services.v1.DeployService.deploy(DeployService.java:280) ~[halyard-deploy-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at com.netflix.spinnaker.halyard.controllers.v1.DeploymentController.lambda$deploy$20(DeploymentController.java:262) ~[halyard-web-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at com.netflix.spinnaker.halyard.core.DaemonResponse$StaticRequestBuilder.build(DaemonResponse.java:127) ~[halyard-core-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at com.netflix.spinnaker.halyard.core.tasks.v1.TaskRepository.lambda$submitTask$1(TaskRepository.java:48) ~[halyard-core-1.10.1-20180912131447.jar:1.10.1-20180912131447]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181]

But I didn’t configure a namespace called spinnaker… Is it mandatory to install Spinnaker in a namespace spinnaker?
The ‘forbidden’ error is caused because with the actual permissions the account can’t ask for a kubectl get namespace. I’m waiting for that new permission from the IT team.

Besides, I have doubts with the Kubernetes accounts configured with Halyard. I configured an account for the intstallation of Spinnaker, but I will have to configured another accounts for each application/environment we are to deploy (on diferent EKS). Isn`t it?


#2

hal config deploy edit --type distributed --account-name spinnaker-account --namespace tdc-apps

and try

or add location in config file —> location: tdc-apps
artifact: true


#3

Thank you very much @Mohammed_Ajaz
I will include the parameter location in hal-config-deploy-edit

--location: This is the location spinnaker will be deployed to. When deploying to Kubernetes, use this flag to specify the namespace to deploy to (defaults to 'spinnaker')


#4

I was using AWS for distribution
hal config deploy edit --type distributed --account-name spinnaker-account

Problems in default.deploymentEnvironment:
! ERROR Account spinnaker-account not defined.

can I know where to define the account ?