Blue-Green Deployments with Spinnaker: Difference between revisions
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
* [[Spinnaker#Subjects|Spinnaker]] | * [[Spinnaker#Subjects|Spinnaker]] | ||
=Overview= | =Overview= | ||
This article documents a pipeline that deploys a release in a Stage environment, waits for testing, the deploys the same release in Prod. The application is a Helm-packaged Kubernetes application, but some of the Kuberentes resources are created manually directly in Spinnaker. | |||
=Create Services= | |||
Create two Services ("stage" and "prod") within the Spinnaker Application. | |||
Load Balancers → Create Load Balancer | |||
Select the right "account" (Kubernetes cluster) | |||
Manifest (do not forget to adjust the namespace): | |||
<syntaxhighlight lang='yaml'> | |||
apiVersion: v1 | |||
kind: Service | |||
metadata: | |||
name: stage | |||
namespace: of02 | |||
spec: | |||
type: ClusterIP | |||
selector: | |||
stage: 'true' | |||
ports: | |||
- port: 8080 | |||
name: http | |||
targetPort: 8080 | |||
</syntaxhighlight> | |||
<syntaxhighlight lang='yaml'> | |||
apiVersion: v1 | |||
kind: Service | |||
metadata: | |||
name: prod | |||
namespace: of02 | |||
spec: | |||
type: ClusterIP | |||
selector: | |||
stage: 'true' | |||
ports: | |||
- port: 8080 | |||
name: http | |||
targetPort: 8080 | |||
</syntaxhighlight> | |||
=Organizatorium= | |||
<font color=darkkhaki> | <font color=darkkhaki> | ||
TO PROCESS: | TO PROCESS: |
Revision as of 04:03, 9 March 2022
External
Internal
Overview
This article documents a pipeline that deploys a release in a Stage environment, waits for testing, the deploys the same release in Prod. The application is a Helm-packaged Kubernetes application, but some of the Kuberentes resources are created manually directly in Spinnaker.
Create Services
Create two Services ("stage" and "prod") within the Spinnaker Application.
Load Balancers → Create Load Balancer
Select the right "account" (Kubernetes cluster)
Manifest (do not forget to adjust the namespace):
apiVersion: v1
kind: Service
metadata:
name: stage
namespace: of02
spec:
type: ClusterIP
selector:
stage: 'true'
ports:
- port: 8080
name: http
targetPort: 8080
apiVersion: v1
kind: Service
metadata:
name: prod
namespace: of02
spec:
type: ClusterIP
selector:
stage: 'true'
ports:
- port: 8080
name: http
targetPort: 8080
Organizatorium
TO PROCESS:
- https://blog.spinnaker.io/introducing-rollout-strategies-in-the-kubernetes-v2-provider-8bbffea109a
- https://spinnaker.io/docs/guides/user/kubernetes-v2/rollout-strategies/#redblack-rollouts
- https://spinnaker.io/docs/guides/user/kubernetes-v2/traffic-management/
- https://www.opsmx.com/blog/spinnaker-pipeline-blue-green-strategy-with-external-versioning-and-kubernetes-deployment-object/
- https://www.opsmx.com/blog/spinnaker-integration-with-istio/