What is a Kubernetes deployment? (2024)

  • Topics
  • Understanding Linux containers
  • What is a Kubernetes deployment?

Published April 23, 2020

What is a Kubernetes deployment? (1)

Red Hat named a Leader in the 2023 Gartner® Magic Quadrant™

Red Hat was positioned highest for ability to execute and furthest for completeness of vision in the Gartner 2023 Magic Quadrant for Container Management.

Read the report

Overview

A Kubernetes deployment is a resource object in Kubernetes that provides declarative updates to applications. A deployment allows you to describe an application’s life cycle, such as which images to use for the app, the number of pods there should be, and the way in which they should be updated.

A Kubernetes object is a way to tell the Kubernetes system how you want your cluster’s workload to look. After an object has been created, the cluster works to ensure that the object exists, maintaining the desired state of your Kubernetes cluster.

The process of manually updating containerized applications can be time consuming and tedious. Upgrading a service to the next version requires starting the new version of the pod, stopping the old version of a pod, waiting and verifying that the new version has launched successfully, and sometimes rolling it all back to a previous version in the case of failure.

Performing these steps manually can lead to human errors, and scripting properly can require a significant amount of effort, both of which can turn the release process into a bottleneck.

A Kubernetes deployment makes this process automated and repeatable. Deployments are entirely managed by the Kubernetes backend, and the whole update process is performed on the server side without client interaction.

A deployment ensures the desired number of pods are running and available at all times. The update process is also wholly recorded, and versioned with options to pause, continue, and roll back to previous versions.

Automate deployments with pre-made, repeatable Kubernetes patterns

The Kubernetes deployment object lets you:

  • Deploy a replica set or pod
  • Update pods and replica sets
  • Rollback to previous deployment versions
  • Scale a deployment
  • Pause or continue a deployment

Application management strategies using Kubernetes deployment

Managing your applications with a Kubernetes deployment includes the way in which an application should be updated. A major benefit of a deployment is the ability to start and stop a set of pods predictably.

Rolling update strategy

A rolling update strategy provides a controlled, phased replacement of the application's pods, ensuring that there are always a minimum number available.

The deployment makes sure that, by default, a maximum of only 25% of pods are unavailable at any time, and it also won’t over provision more than 25% of the number of pods specified in the desired state.

The deployment won’t kill old pods until there are enough new pods available to maintain the availability threshold, and it won’t create new pods until enough old pods are removed.

The deployment object allows you to control the range of available and excess pods through maxSurge and maxUnavailable fields.

With a rolling update strategy there is no downtime during the update process, however the application must be architected to ensure that it can tolerate the pod destroy and create operations.

During the update process 2 versions of the container are running at the same time, which may cause issues for the service consumers.

Recreate strategy

A recreate strategy removes all existing pods before new ones are created. Kubernetes first terminates all containers from the current version and then starts all new containers simultaneously when the old containers are gone.

With a recreate deployment strategy there is some downtime while all containers with old versions are stopped and no new containers are ready to handle incoming requests.

However, there won’t be 2 versions of the containers running at the same time, which may make it simpler for service consumers.

Kubernetes with Red Hat OpenShift

Declarative deployment pattern for Kubernetes

Deployments are created by writing a manifest. The manifest is then applied to the Kubernetes cluster using kubectl apply, or you can use a declarative deployment pattern. Configuration files for Kubernetes can be written using YAML or JSON.

When creating a deployment, you’ll describe the desired state and Kubernetes will implement it using either a rolling or recreate deployment strategy.

Using a declarative deployment pattern allows you to use a Kubernetes deployment to automate the execution of upgrade and rollback processes for a group of pods. Kubernetes patterns are reusable design patterns for container-based applications and services.

You can update a deployment by making changes to the pod template specification. When a change is made to the specification field, it triggers an update rollout automatically.

The rollout lifecycle consists of progressing, complete, and failed states. A deployment is progressing while it is performing update tasks, such as updating or scaling pods.

Complete indicates that all tasks were completed successfully and the system is in the desired state. A failed state is the result of some error that keeps the deployment from completing its tasks.

You can check or monitor the state of a deployment using the kubectl rollout status command.

Need help getting started with Kubernetes? Learn to build and manage containers for deployment on a Kubernetes and Red Hat® OpenShift® cluster. This training course will help you to build core knowledge in managing containers through hands-on experience with containers and Kubernetes.

Start the training courseIcon-Red_Hat-Directional-A-Black-RGB

Kubernetes for the enterprise

Red Hat OpenShift is an enterprise-ready Kubernetes platform. It gives developers self-service environments for building, and full-stack automated operations on any infrastructure.

What is a Kubernetes deployment? (2)

Red Hat OpenShift includes all of the extra pieces of technology that makes Kubernetes powerful and viable for the enterprise, including: registry, networking, telemetry, security, automation, and services.

With Red Hat OpenShift, developers can make new containerized apps, host them, and deploy them in the cloud with the scalability, control, high availability, and orchestration that can turn a good idea into new business quickly and easily.

Learn more about Red Hat OpenShiftIcon-Red_Hat-Directional-A-Black-RGB

What is a Kubernetes deployment? (2024)

References

Top Articles
Horoscope Today: July 21, 2021
Horoscope Today: May 17, 2024
Joi Databas
Le Blanc Los Cabos - Los Cabos – Le Blanc Spa Resort Adults-Only All Inclusive
Craigslist Vans
35105N Sap 5 50 W Nit
Words From Cactusi
State Of Illinois Comptroller Salary Database
Comenity Credit Card Guide 2024: Things To Know And Alternatives
Marion County Wv Tax Maps
A rough Sunday for some of the NFL's best teams in 2023 led to the three biggest upsets: Analysis - NFL
How To Cut Eelgrass Grounded
Char-Em Isd
Harem In Another World F95
8664751911
Csi Tv Series Wiki
Foxy Brown 2025
Milanka Kudel Telegram
Walgreens Alma School And Dynamite
Lola Bunny R34 Gif
Xsensual Portland
The Tower and Major Arcana Tarot Combinations: What They Mean - Eclectic Witchcraft
Drug Test 35765N
Suspiciouswetspot
Xxn Abbreviation List 2017 Pdf
Truvy Back Office Login
Anesthesia Simstat Answers
Superhot Free Online Game Unblocked
Co10 Unr
Airg Com Chat
Ugly Daughter From Grown Ups
The Menu Showtimes Near Amc Classic Pekin 14
Japanese Pokémon Cards vs English Pokémon Cards
Sun Haven Pufferfish
Lake Dunson Robertson Funeral Home Lagrange Georgia Obituary
Craigs List Jonesboro Ar
Mydocbill.com/Mr
Bitchinbubba Face
Search All of Craigslist: A Comprehensive Guide - First Republic Craigslist
About My Father Showtimes Near Amc Rockford 16
Cnp Tx Venmo
Craigslist Odessa Midland Texas
The Attleboro Sun Chronicle Obituaries
Guided Practice Activities 5B-1 Answers
Best Conjuration Spell In Skyrim
Stosh's Kolaches Photos
Iupui Course Search
Tweedehands camper te koop - camper occasion kopen
Dcuo Wiki
Inloggen bij AH Sam - E-Overheid
All Obituaries | Roberts Funeral Home | Logan OH funeral home and cremation
Craigslist Centre Alabama
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 6464

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.