Spinnaker is a continuous delivery platform that aims to deploy software changes in a multi-cloud environment such as AWS GCP. Spinnaker takes out the manual activities by automating the processes in a Continuous Delivery approach, and it helps organizations to:
Kubernetes is an open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. Developed by Google, it simplifies complex application management by providing a robust infrastructure for distributed systems. Kubernetes manages clusters of nodes that run containers, enabling seamless scaling, load balancing, automated rollouts, and rollbacks. It also offers self-healing capabilities by automatically replacing failed containers and managing resource allocation, ensuring high availability and fault tolerance for applications across cloud, on-premises, or hybrid environments.
It releases changes such as features, bug fixes, and configurations into end-users hands or production environments in a safe, quick, and autonomous process.
Amazon EKS (Elastic Kubernetes Service) is a managed service that makes it easier to run Kubernetes on AWS. With Amazon EKS, you can deploy, manage, and scale containerized applications using Kubernetes without the need to manage the underlying infrastructure.
Spinnaker has two core concepts: Application Management and Application Deployment. These concepts are the foundation of Spinnaker's ability to streamline continuous delivery workflows and ensure consistent and reliable deployments in a multi-cloud environment.
Application deployment features are beneficial to creating continuous delivery workflows.
It manages deployment in Spinnaker. The pipeline comprises stages, and each step represents a sequence of actions. Can start pipeline either manually or automatically. We can relate this to a Jenkins job as well. Ultimately, we can also add notifications that will go to respective endpoints, such as SMS or email, with the result of pipeline execution.
A stage is a sequence of steps or actions a pipeline performs. Stages in a pipeline can be any sequence such as the deployment, rebuild, and creation stages.
Spinnaker supports all deployment strategies, such as Blue-green, Red/Black, Canary, etc. Blue/Green Blue-green deployment is a strategy with two identical environments, a “blue” and a “green” environment with different versions of an application. Testing is performed on Blue environments, such as quality assurance, and once testing is done, the user traffic is shifted from the Blue environment to the Green environment.
Canary deployment is a deployment strategy that releases an application incrementally to a subset of users. All infrastructure in a target environment is updated in small phases (e.g: 2%, 30%, 78%, 100%).
Kubernetes Operators and the Operator Framework provide a powerful way to automate application management tasks on Kubernetes and streamline continuous delivery workflows and ensure consistent & reliable deployments in a multi-cloud environment.
There could be several use cases, the simplest being detecting a container image push. Some tests will be performed on the image that, on being successful, will make the Spinnaker push the image to the repository.
We can even introduce manual approval before the deployment stage if we want to notify a group of developers to approve the deployment.
There can be other stages like slacking a dev team with an approval waiting, kicking off another pipeline run in a stage, or sending off a webhook, to name a few.
Monitor kubernetes Cluster health using Spinnaker.
Spinnaker constructs such as server groups, or load balancers can be mapped to Spinnaker resources.
Capabilities offered by Spinnaker are more advanced than Kubernetes deployment API.
Spinnaker offers multiple deployment strategies with the help of deployment pipelines, which Kubernetes does not offer.
Spinnaker uses Kubernetes API, which helps perform every function that kubernetes offers. (using kubectl)
Spinnaker offers various deployment strategies such as Blue/Green and easy rollbacks. Kubernetes does not offer that.
Kubernetes uses a Deployment controller to deploy resources. It is now suggested to use a ReplicaSet.
It can be pointed to an existing Kubernetes cluster.
Spinnaker offers the capability of reading the existing deployment of resources in a Kubernetes cluster as if Spinnaker deployed them and showed the same in its dashboard.
Spinnaker adds no additional metadata to any Cloud provider, such as AWS GCP.
It offers to deploy things using Spinnaker UI, but Spinnaker SPI can directly help to control things.
Streamline the application deployment workflows and ensure consistent and reliable deployments on Kubernetes clusters. Helm - Package Manager for Kubernetes
Simple Kubernetes deployment workflow with Spinnaker
Pre-requisites
Running Kubernetes Cluster.
A Spinnaker set-up with Jenkins CI enabled.
Github webhook enabled for Jenkins jobs.
We discussed how to create a continuous delivery pipeline with Spinnaker. We also shared various Spinnaker concepts, such as Spinnaker pipeline stages. While this pipeline is fundamental, Spinnaker supports many more things, such as rollbacks and deployment strategies, such as canary deployments Blue/Green. Integrate it with continuous integration tools like Jenkins and Travis CI. It can also integrate with Prometheus and SignalFx for canary analysis.
- Explore How to implement a Kubernetes Strategy in your Organization?
- Read more about Debug Application Running on Kubernetes?
- Explore The Guide to Kubernetes Architecture