Select Page
by

Shashank Srivastava

|
last updated on February 5, 2024
Share

Introduction

As Spinnaker has a microservice-oriented architecture, the recommended way to deploy Spinnaker is to deploy in a Kubernetes environment (an open-source system for automating deployment, scaling, and management of containerized applications using microservices). In this tutorial, we will show you how easy it is to set up a Spinnaker instance in Kubernetes using Helm Charts.

What are Helm Charts?

Helm is the package manager that uses charts or collections of files that describe a related set of Kubernetes resources. Deployment with HELM brings a lot of conveniences, as anyone can easily deploy HELM map into Kubernetes clusters 

You can have a Spinnaker up and running in less than 20 minutes. To be successful, the Kubernetes cluster needs to support:

Download Advanced deployment strategies

Pre-requisites of deploying Spinnaker on Kubernetes

  • You have Kubernetes cluster ready and kubectl can connect to that cluster
  • You have helm v3 installed

Steps to deploy Spinnaker on Kubernetes

				
					oc adm policy add-scc-to-user anyuid -z mychart-spinnaker-halyard
				
			
  • We will install Spinnaker using the published stable Helm chart. If you want to customize the installation, get the values.yaml file, and customize it.
				
					wget https://raw.githubusercontent.com/helm/charts/master/stable/spinnaker/values.yaml
				
			
  • Run helm commands to setup Spinnaker (the -f values. yaml is required if you are customizing your installation)
				
					helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm install spinnaker stable/spinnaker [-f values.yaml]
				
			
  • Give it some time. Once all the pods are running, your Spinnaker is deployed and ready to use.
				
					$ kubectl get pods
NAME                                READY   STATUS      RESTARTS   AGE
spin-clouddriver-749d9c9589-wg49j   1/1     Running     0          11m
spin-deck-775cdfccff-shzcb          1/1     Running     0          11m
spin-echo-5fd76b8f79-fkdm9          1/1     Running     0          11m
spin-front50-597b4ff46d-72kxr       1/1     Running     0          11m
spin-gate-7dc88df658-xl8nm          1/1     Running     0          11m
spin-igor-67b9b4c66-zs28q           1/1     Running     0          11m
spin-orca-7d5958f8d6-c6w7x          1/1     Running     0          11m
spin-rosco-67847b657b-gx5vc         1/1     Running     0          11m
spinnaker-install-using-hal-mdt4q   0/1     Completed   0          14m
spinnaker-minio-5c994565d6-fjdkm    1/1     Running     0          14m
spinnaker-redis-master-0            1/1     Running     0          14m
spinnaker-spinnaker-halyard-0       1/1     Running     0          14m
				
			

Your Spinnaker is now deployed but how do you access it? You could always create port-forwards as mentioned in the output of the helm install used to deploy Spinnaker. But that works when you are using your local laptop. If your Kubernetes cluster supports loadbalancer services, it is easier to create a loadbalancer and access Spinnaker. This best option to make it available to everyone.

  • Create a file spinsvcs.yml to create the loadbalancer service to Spinnaker.
				
					apiVersion: v1
kind: Service
metadata:
  labels:
    app: spin
     stack: deck
   name: spin-deck-ui
spec:
  type: LoadBalancer
ports:
  - name: http
    port: 9000
    protocol: TCP
selector:
    cluster: "spin-deck"
				
			
  • Run the commands to create the service
				
					kubectl apply -f spinsvcs.yml
				
			
  • To get the hostname to connect to Spinnaker run,

Once you have the EXTERNAL-IP address, you can connect to Spinnaker using the value of the EXTERNAL-IP. For example, using the above we get the output as:

				
					$ kubectl get service spin-deck-ui
NAME           TYPE           CLUSTER-IP     EXTERNAL-IP     PORT(S)          AGE
spin-deck-ui   LoadBalancer   172.30.16.45   52.147.219.48   9000:31544/TCP   12m
				
			
				
					http://52.147.219.48:9000
				
			

Already using Spinnaker? Yes, then you might be interested in how to deploy HELM charts to Kubernetes using Spinnaker CD pipeline.

In case you want visibility and insights into the Spinnaker deployments across clusters and clouds, then try an application dashboard for Spinnaker CD. 

About OpsMx

Founded with the vision of “delivering software without human intervention,” OpsMx enables customers to transform and automate their software delivery processes. OpsMx builds on open-source Spinnaker and Argo with services and software that helps DevOps teams SHIP BETTER SOFTWARE FASTER.

Shashank Srivastava

As a Country Manager, Sales & Marketing (ROW) at OpsMx, Shashank is responsible for revenue for Europe, Middle East and Asia Pacific. He is also responsible for Product Marketing and Strategic Partnerships. Shashank brings in over 20 years of experience in selling and marketing technology / software solutions. Over these years he has led teams for marketing, sales, business development and field operations. He has successfully driven several strategic initiatives within startup environments.

Link

1 Comment

  1. techd

    I tried deploying it in EKS cluster using helm charts, but when s3 is enabled it times out and fails otherwise it gets deployed fine.
    S3 section:
    s3:
    enabled: true
    bucket: “spinnaker”
    rootFolder: “front50”
    region: “us-east-1”
    # endpoint: “”
    # accessKey: “”
    # secretKey: “”
    assumeRole: “arn::::::myrolename”
    ## Here you can pass extra arguments to configure s3 storage options
    extraArgs: []
    # – “–path-style-access true”
    It throws error unexpected key value or it times out.
    Here i tried to attach the IAM role to pods but it doesn’t work either and says unexpected value.
    ## You can use it to add annotations for pods, override the image, etc.
    additionalServiceSettings: {}
    deck.yml:
    artifactId: gcr.io/spinnaker-marketplace/deck:2.9.0-20190412012808
    kubernetes:
    podAnnotations:
    iam.amazonaws.com/role: arn:aws:iam::1234567:role/SpintestInt
    clouddriver.yml:
    kubernetes:
    podAnnotations:
    iam.amazonaws.com/role: arn:aws:iam::1234567:role/SpintestInt

    Reply

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.