Stream Data Platform

Discover new business efficiently

Monitoring & Alerting

Establish a systems that are supposed to run well

Infrastructure As Code

Discover DevOps best practice

Data Lineage

Uncovers the life cycle of data

Security

Protect your data anaytics tools

Kubernetes Deployment

Documentation Kubernetes Deployment

Introduction

A Deployment provides declarative updates for Pods and ReplicaSets. You describe the desired state in a Deployment, and the Deployment controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets or to remove existing Deployments and adopt all their resources with new Deployments. For organizations that operate at a massive scale, a single Linux container instance isn't enough to satisfy all of their applications' needs.

Kubernetes Architectures

Enter Kubernetes, a container orchestration system — a way to manage the lifecycle of containerized applications across an entire fleet. It's a sort of meta-process that grants the ability to automate the deployment and scaling of several containers at once. Several containers running the same application are grouped. These containers act as replicas and serve to load balance incoming requests.

Requirements

  • Download and install Docker Desktop as described in Orientation and setup.
  • Work through containerizing an application in Part 2.
  • Make sure that Kubernetes is enabled on your Docker Desktop.
  • If Kubernetes isn't running, follow the instructions in Orchestration of this tutorial to finish setting it up.

Use Case

  • Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. Check the status of the rollout to see if it succeeds or not.
  • Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. A new ReplicaSet is created and the Deployment manages to move the Pods from the old ReplicaSet to the new one at a controlled rate. Each new ReplicaSet updates the revision of the Deployment.
  • Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. Each rollback updates the revision of the Deployment.

Kubernetes Pods

Pods are the smallest deployable units of computing that you can create and manage in Kubernetes. A Pod (as in a pod of whales or pea pod) is a group of one or more containers, with shared storage and network resources, and a specification for how to run the containers.

Kubernetes Services

Kubernetes Pods are created and destroyed to match the state of your cluster. Pods are nonpermanent resources. If you use a Deployment to run your app, it can create and destroy Pods dynamically.

Kubernetes YAML

All containers in Kubernetes are scheduled as pods, which are groups of co-located containers that share some resources. Furthermore, in a realistic application, we rarely create individual pods; instead, most of our workloads are scheduled as deployments, which are scalable groups of pods maintained automatically by Kubernetes. Lastly, all Kubernetes objects can and should be described in manifests called Kubernetes YAML files.

Conclusion

At this point, we have successfully used Docker Desktop to deploy our application to a fully-featured Kubernetes environment on our development machine. We haven't done much with Kubernetes yet, but the door is now open; you can begin adding other components to your app and taking advantage of all the features and power of Kubernetes, right on your own machine.

Grow with our
amazing products