This article reviews concepts in Kubernetes deployment, as well as delves into various advanced Kubernetes deployment strategies, pros and cons, and use cases.
Join the DZone community and get the full member experience. This is an article from DZone’s 2021 Kubernetes and the Enterprise Trend Report. For more: In the modern technology landscape, Kubernetes is a widely adopted platform that enables organizations to deploy and manage applications at scale. The container orchestration platform simplifies infrastructure provisioning for microservice-based applications, which empowers efficient workload management through modularity. Kubernetes supports various deployment resources to help implement CI/CD pipelines using updates and versioning. While Kubernetes offers rolling updates as the default deployment strategy, several use cases require a non-conventional approach to deploying or updating cluster services. This article reviews concepts in Kubernetes deployment, as well as delves into various advanced Kubernetes deployment strategies, pros and cons, and use cases. Kubernetes uses deployment resources to update applications declaratively. With deployments, cluster administrators define an application’s lifecycle and how related updates should be performed. Kubernetes deployments offer an automated way to achieve and maintain the desired state for cluster objects and applications. The Kubernetes back end manages the deployment process without manual intervention, offering a safe and repeatable way of performing application updates. Kubernetes deployments allow cluster administrators to: The following section explores how Kubernetes simplifies the update process for containerized applications, and how it solves the challenges of continuous delivery. While Kubernetes leverages a number of workload resource objects as persistent entities to manage the cluster state, the Kubernetes API uses the Deployment, ReplicaSet, StatefulSet, and DaemonSet resources for declarative updates to an application. Deployment is a Kubernetes resource used to define and identify the application’s desired state. A cluster administrator describes the desired state in the deployment’s YAML file, which is used by the deployment controller to gradually change the actual state to the desired state. To ensure high availability, the deployment controller also constantly monitors and replaces failed cluster nodes and pods with healthy ones. A ReplicaSet is used to maintain a specific number of pods, ensuring high availability. The ReplicaSet’s manifest file includes fields for: The StatefulSet object manages the deployment and scaling of pods in a stateful application. This resource manages the pods based on identical container specifications and then ensures appropriate ordering and uniqueness for a set of pods. The StatefulSet’s persistent pod identifiers enable cluster administrators to connect their workloads to persistent storage volumes with guaranteed availability.