Create a New Pipeline
We’re going to start off with a simple “Deploy Application” pipeline, that will have a single stage that deploys the dev version of our application. We’re going to be deploying this as a Kubernetes Deployment object, which will handle rollouts for us.
Create the pipeline
Switch to “Pipelines” tab on the left-hand bar
Choose “Configure a new pipeline” if it is your first pipeline (otherwise you should see “+ Create” button)
Give the pipeline the name Deploy Application
Add a ‘tag’ parameter:
- Click “Add Parameter” (in the middle of the page)
- Specify
tag
as the Name
- Check the “Required” checkbox
- Check the “Pin Parameter” checkbox
- Add a Default Value of
monday
(all lowercase)
Add the Deploy Dev stage
- Click “Add Stage” at the top section of the configuration
- In the “Type” dropdown, select
Deploy (Manifest)
- Update the “Stage Name” field to be
Deploy Dev
- In the “Account” dropdown, select “spinnaker”
- Select the ‘Override Namespace’ checkbox, and select ‘dev’ in the dropdown
- Copy and paste the manifest content below. Note the ${parameters[“tag”]} field, which will pull in the tag parameter defined above. Click “Save Changes” now.
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-today
spec:
replicas: 3
selector:
matchLabels:
app: hello-today
template:
metadata:
labels:
app: hello-today
lb: hello-today
spec:
containers:
- image: 'justinrlee/nginx:${parameters["tag"]}'
name: primary
ports:
- containerPort: 80

Trigger the pipeline
- Click back on the “Pipelines” tab at the top of the page
- Click on “Start Manual Execution” next to your newly created pipeline (you can also click “Start Manual Execution” in the top right, and then select your pipeline in the dropdown)

- Click “Run”
Your application should be deployed. Look at the status of this in three ways:
- Go to the left-hand infrastructure tab and choose “Clusters”. You should see your application, which consists of a Deployment with a single ReplicaSet. Examine different parts of this page

- Go to the “Load Balancers”. Examine different parts of this page (for example, try checking the ‘Instance’ checkbox, so you can see ReplicaSets and Pods attached to your Service)

- Navigate to “Load Balancers”, select DEV namespace in “ingress hello-today” and on the right-hand information tab you can identify Ingress URL. Replace it in https://<your-ingresss-url>/dev/hello-today, and you should see your app returning last deployed tag value
