You do not associate the volume with any Pod. StatefulSet is the workload API object used to manage stateful applications. Contrairement à un Deployment, un. Pic from k8s. In this example, we’ve defined a StatefulSet named “my-statefulset” with a headless service named “my-statefulset-headless”. Before you begin This task assumes you have an application running on your cluster represented by a StatefulSet. The Pods would be named kafka-0, kafka-1, and. apps. Description. yaml. StatefulSets are designed to run stateful applications in Kubernetes with dedicated persistent storage. Define the application in YAML format using kind: StatefulSet. In this article, we’ll take a look at the differences between Deployment and StatefulSet and when you. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. Here is what the above statefulset does: Set 3 replicas. Like a Deployment, a StatefulSet manages Pods that are based on an identical container spec, but unlike a Deployment, a StatefulSet maintains a sticky. In Prefect Cloud, go to Blocks, hit the + button, and select the Kubernetes Job block. The StatefulSet, typically used to manage stateful applications, manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. Deployment. Gestiona el despliegue y escalado de un conjunto de Pods, y garantiza el orden y unicidad de dichos Pods. 安定したネットワーク識別子. 2. Each new pod in statefulset then have a new PV attached to them to. For example, web1, web2, web3 and web4, for a. env. However, while Elasticsearch uses terms like cluster and node, which are also used in Kubernetes, their meaning is slightly different. For a StatefulSet with N replicas, each Pod in the StatefulSet will be assigned an integer ordinal, from 0 up through N-1, that is unique over the Set. StatefulSets and Deployments are two Kubernetes API objects used to manage sets of identical Pods. It can span multiple Kubernetes clusters under the same monitoring umbrella. Objectives Create a PersistentVolume referencing a disk in your environment. deepak. In a production. Our application is a bank service application that uses a mariadb database as its datastore. Pods created by a StatefulSet have predictable names (and hostnames), unlike those created by a ReplicaSet . This logic is mandatory in. Example code for HPA:Create a stateful set. v1. For example, if you have 3 nodes, it will schedule 3. spec: serviceAccountName: build. This is important because many stateful applications have data initialization routines to perform, masters to elect, and quorum to achieve. StatefulSet is the workload API object used to manage stateful applications. Moreover, if at any point one of the replicas fails to start, the whole process will stop. If you don’t specify the namespace, it gets deployed in the default namespace. how=very --from-literal=special. The user can specify a different scheduler for the Pods of the DaemonSet, by setting the . summary, it is possible to set min / max replicas for a statefulset using HPA. A pod is the smallest deployable unit in Kubernetes which has a collection of containers. Using a shell script we would call $ {HOSTNAME##*-} to get the index. I agree with you. For example, if you have 3 nodes, it will schedule 3. 8 min read. RollingUpdate: The RollingUpdate update strategy implements automated, rolling update for the Pods in a StatefulSet. updateStrategy is left unspecified. MySQL settings remain on insecure defaults to keep the focus on general patterns for running stateful. We like to dynamically assign a value (that's derived from the ordinal index) to the pod's label and later. The user can specify a different scheduler for the Pods of the DaemonSet, by setting the . To get the name just read the environment variable HOSTNAME. Related Resources. A pod is the smallest deployable unit in Kubernetes which has a collection of containers. Object Names and IDs. In Kubernetes, a Service is a method for exposing a network application that is running as one or more Pods in your cluster. As with StatefulSet creation, the StatefulSet controller created each Pod sequentially with respect to its ordinal index, and it waited for each Pod's predecessor to be Running and Ready before launching the subsequent Pod. 9) is a Kubernetes resource used to manage stateful applications. schedulerName field of the DaemonSet. Stable Network ID. StatefulSet is a Kubernetes controller that manages multiple pods that have unique identities, and are not interchangeable (unlike a regular Kubernetes Deployment, in which pods are stateless and. February 4, 2021. It specifies that there should be three replicas of the Deployment and that each pod should be labeled with app: nginx. $ kubectl exec -it test-deployment-54d954d7f-2b582 sh / $ ps PID USER TIME COMMAND 1 2000 0:00 sleep 1h 6 2000 0:00 sh 11 2000 0:00 ps / $ whoami whoami: unknown uid 200 Share. spec. We are now in the interesting part of this meal. Editor's note: today's post is by Janet Kuo and Kenneth Owens, Software Engineers at Google. Unlike a Deployment, a StatefulSet has a persistent ID for each Pod that persists across any rescheduling or. 04 Sep 2023 · 11 min read. The Airflow Operator creates and manages the necessary Kubernetes resources for an Airflow deployment and supports the creation of Airflow schedulers with different Executors. This comes at a cost of slow scale ups and. Also, you will not have to create a PVCs in advance, and you will be able to scale it easily. As mentioned above most of the time you can simply use volumes without the need to define StorageClass or PV/PVC. Apr 6, 2020 at 8:53. Podname and Identity. 15)不支持这一属性,只有StatefulSet才有,因此不得不使用后者。. Define a Stateful Set with PVC. So we will add the namespace while deploying each component. But many times, due to some requirements, users make sure that the pods are deployed in order with persistent storage volume and. 9. Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. First sentence in the documentation: "The Horizontal Pod Autoscaler automatically scales the number of Pods in a replication controller, deployment, replica set or stateful set". This name will become the basis for the ReplicaSets and Pods which are created later. 6. io/ssd created Deploy etcd cluster. Deploymentなど、StatefulSet以外のリソースを使う必要がある。Node Deployment: K8s DaemonSet achieves deploying multiple instances of an application in all nodes. In StatefulSet, instead of the normal service, we need to create a headless service. 23 introduced a new, alpha-level policy for StatefulSets that controls the lifetime of PersistentVolumeClaims (PVCs) generated from the StatefulSet spec template for cases when they should be deleted automatically when the StatefulSet is deleted or pods in the StatefulSet are scaled. This page shows you how to run a single-instance stateful application in Kubernetes using a PersistentVolume and a Deployment. yaml. If you want to delete just the StatefulSet and not the pods, use --cascade=false. So yes, StatefulSet helps preserve the order and name of the pod, but what is it that it does extra (or different) that is advantageous over a regular Deployment with respect to volumes. Kubernetes is a powerful container orchestration tool that provides a variety of resources for managing containerized applications. 5 In the latest release, Kubernetes 1. Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. This is where PersistentVolumes come into play. Yes, Statefulset is the way to go if the pods need to have their identity defined in some way. Now that we have the ordinal index, we can use if for selecting the configuration. While the pod is the basic deployment unit for containers, Kubernetes provides various resource objects for orchestrating multiple pod replicas. spec. In the same blog we used PersistentVolumeClaim for dynamic provisioning of PersistentVolume, but we used. Overview of StatefulSets. k8s. Definitely leverage a persistent volume for database. deployment daemonset Kubernetes (K8s) is one of the popular open-source container orchestration systems for automating deployment, scaling, and management. Understanding ReplicaSets It will trigger them all at once. The StatefulSet will not even scale until all the required pods are running, so if one dies, it recreates the pod before. There were no major changes to the API Object, other than the community selected name, but we added the semantics of “at most one. Use kubectl to scale StatefulSets; kubectl scale sts nacos --replicas=3kubernetes, docker, k8s, cluster, kubectl, Workloads, DaemonSet, CronJob, StatefulSet, Job. Comme un Déploiement, un StatefulSet gère des Pods qui sont basés sur une même spécification de conteneur. In this article, we’ll take a look at the differences between Deployment and StatefulSet and when you should use one over the other. StatefulSet también es un controlador, pero a diferencia del deployment, no crea ReplicaSet sino que crea el Pod directamente con una nomenclatura única. For example, you can only have one Pod named myapp-1234 within the same namespace, but you can have one Pod and one Deployment that are each named. apps/mongo created Click Check my progress to verify the objective. As a pod can have. It can appear that StatefulSet is a way to solve at most one instance in a situation with a network partition, but that is mostly in case of a stateful replicated application like e. spec. mourya ~ % kubectl get statefulset NAME READY AGE web 3/3 68s. Each Pod in a StatefulSet derives its hostname from the name of the StatefulSet and the ordinal of the Pod. But for an eviction, the PodDisruptionBudget's maxUnavailable will prevail, even if the Deployment specifies a. The spec matches the StatefulSet to the Headless Service using a selector that matches the labels. For a typical Kubernetes Pod, it will be managed by a higher-level controller like a Deployment. The --machine-type flag tells the node pool to use the n2-standard-4 machine type (4 vCPUs, 16 GB memory), which meets our. It demonstrates how to create, delete, scale, and update the Pods of StatefulSets. Just like StatefulSets, Kubernetes Deployments let you define the state of the application, and the Deployment’s controller is responsible for maintaining this state. The StatefulSet name is derived from the Elasticsearch resource name and the NodeSet name. Since the two are packaged in mongo-statefulset. This means that a Deployment can have as many active ReplicaSets as possible, and eventually the deployment controller will scale down all old ReplicaSets and scale up the newest one. For example, you define how many replicas ( pods) of your app you want to run in the deployment. From there, the StatefulSet Controller handles the. When we scale the StatefulSet from 1 replica to 3, the StatefulSet controller starts to incrementally deploy new (missing) pods, one at a time. I have been trying to debug a very odd delay in my K8S deployments. affinity. See Writing a Deployment Spec for more details. Introduction to autoscaling in k8s. A StatefulSet is a Kubernetes API object for managing stateful application workloads. vim redis-statefulset. If you are unsure about whether. Replicas in a StatefulSet follow a graceful, sequential approach to deployment, scale, upgrade, and termination. However, the order matters in a StatefulSet, and K8s will maintain that order when scaling up or down to ensure stability. A StatefulSet is a controller that helps you deploy and scale groups of Kubernetes pods. A DeploymentConfig (DC) in OpenShift is more or less equivalent to a Kubernetes Deployment, nowadays. Deployment and Scaling of StatefulSet. Introduction. I see many examples of master/slave setup for databases as a use case for StatefulSet, but can't that problem be solved with just a Deployment (replicas=1) for the master and a. StatefulSets. Before going for statefulset we should understand the concept of stateful and stateless applications When we scale the StatefulSet from 1 replica to 3, the StatefulSet controller starts to incrementally deploy new (missing) pods, one at a time. A ReplicaSet is used to ensure that a specific number of replicas (copies) of a pod are running at any given time, while a Deployment manages updates to a ReplicaSet by creating a new ReplicaSet with the updated pod template and gradually scaling it up while scaling down the old ReplicaSet. Check. In addition to kubectl rollout restart deployment, there are some alternative approaches to do this: 1. We are on Kubernetes 1. Latest Deployment Generation: kube_deployment_metadata_generation: Sequence number representing the latest generation of a Deployment. The StatefulSet resource deploys Pods sequentially. One pod should be able to reach other pods with well-defined names. In Persistent Volume Claims under Storage, you can see the ClickHouse Cluster components are using persistent volumes. Statefulsets. 3. 5. StatefulSet(stable-GA in k8s v1. 16. Hosting. If we execute the commands: kubectl get sts and kubectl get pods -l app=mysql , we see the cluster deployed. A key aim of Services in Kubernetes is that you don't need to modify your existing application to use an unfamiliar service discovery mechanism. The original node affinity specified at the . The Deployment object not only creates the pods but also ensures the correct. Before going for statefulset we should understand the concept of stateful. 1 Like. Orleans will run in Kubernetes without specific configuration, however, it can also take advantage of extra knowledge which the hosting platform can provide. Job. spec. First, do a git pull to ensure you’re working on the latest revision: $ git pull origin setup-semaphore. deployment vs. Deploy and Manages the stateless application. Elasticsearch nodes have the same name as the Pod they are running on. StatefulSets are particularly useful when you have stateful applications, such as databases, that require stable network identities and persistent storage. a cache or database cluster even though it may solve your specific situation as. Kubernetes has become the de-facto orchestration tool and initially it was supporting stateless applications, but stateful (data-driven) applications are very common and are critical to. Pods created as part of a StatefulSet are given persistent identifiers that they retain even when they’re rescheduled. 部署、扩展、更新、删除都要有顺序 2. kubectl patch statefulset my-set -p '{"spec":{"The last step is to "assign" volume to your execution (Pod, Deployment, StatefulSet, etc) which is done using volumes. spec. A StatefulSets are Kubernetes objects used to consistently deploy stateful application components. Replica sets provide redundancy and high availability and are the basis for all production deployments. All of the other parts are ready and we will just plug in the engine and we will be ready to hit the road. Deployment vs. This topic was automatically closed 28 days after the. Create a new file and fill it with the following StatefulSet configuration then we explain what it does. StatefulSet. In statefulsets each replica pod created has an index number starting from 0 and it will only setup the next replica if the previous one is running. Kubernetes provides a basic resource called Pod. 1. g. Two commonly used ones are Deployments and StatefulSets. 部署、扩展、更新、删除都要有顺序 2. To learn more about replica sets, see the Replication Introduction in the MongoDB manual. We are creating a StatefulSet called postgresql-db with two pods (replicas: 2). kubectl apply -f <name> to recreate the StatefulSet. Author: Deepak Kinni (VMware) PersistentVolume (or PVs for short) are associated with Reclaim Policy. Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. A Deployment manages multiple pods by automating the creation, updating, and deletion of ReplicaSets. All the examples available are showing Redis cluster being deployed as a combination of Kubernetes’ StatefulSets and PersistentVolumes. You can use statefulsets if you want fixed pod names for your application. kuard-0 kuard-1 kuard-2. This post talks about recent updates to the DaemonSet and StatefulSet API objects for Kubernetes. yml Statefulset . Scaling down a Deployment removes arbitrary Pods, which could include the primary node in your database system. Kindly. status. kubectl rollout undo deployment/<deployment name> – Rollback a. This is referred to as at most. Let’s now create the Deployment using the kubectl apply command: $ kubectl apply -f deployment. field to . If your application is stateless, you should use Deployment and not StatefulSet. They both make it easy to orchestrate multiple Pod replicas, but they have different features that specialize them for separate use cases. kubectl rollout restart sts <name> to restart the pods, one at a time. The --region flag specifies a regional three-zone cluster, and --num-nodes specifies one Kubernetes worker node in each zone. A StatefulSet is a set of pods with a unique, persistent hostname and ID. The execution of a Pod depends on other ordinal index. spec section is similar to the ReplicaSet’s, defining the pod template for each replica. I tested this on kubernetes 1. yml Statefulset . From K8S Docs. The solution(s) : Use a StatefulSet, ReplicaSet or DaemonSet to ensure the Pod creation after a Node failure. Before proceeding, make yourself familiar with the considerations. A headless service is a service with a service IP, but instead of load-balancing it will return the IPs of our. I'll try removing some parts of the alertmanager deployment to identify the issue. yaml. v1. If at any point in time the K8S Service happens to route the incoming request to POD with app in passive role, the service is inaccessible/not served. Deploymentと異なり、StatefulSetはPodを直接管理しています。 OrderedReadyはReadinessProbeを監視しつつ、一つずつPodを増減します。 ParallelはDeploymentのスケールと同様、Podを並列的に増減させます。 Podの更新. The Hitchhiker’s Guide to the Galaxy is popular around Prefect. By interpreting the documentation, it seems that it depends on the event. Before you begin This is a fairly advanced task and has the potential to violate some of the properties inherent to StatefulSet. Continue reading "Create statefulset MariaDB application in K8s" A StatefulSet is another Kubernetes controller that manages pods just like Deployments. StatefulSetSpecSorted by: 103. Note: These instructions are for Kubernetes v1. Gestiona el despliegue y escalado de un conjunto de Pods, y garantiza el orden y unicidad de dichos Pods. DaemonSet, Deployment, StatefulSet, and ReplicaSet: will no longer be served from extensions/v1beta1, apps/v1beta1, or apps/v1beta2 in v1. unavailableReplicasThis page shows you how to configure a Pod to use a PersistentVolumeClaim for storage. Note the client provided takes precedence over the configured transport values. StatefulSets manage the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of those Pods. Before proceeding, make yourself familiar with the considerations. 6. Scaling Down. StatefulSetではこれを防ぐために、kubeletが落ちても新たにPodの自動起動をしない。 言い換えると、Podを手動で削除しない限り、新たなPodは起動されない。 Podを自動で起動してほしい場合. replicas integer: Total number of non-terminated pods targeted by this deployment (their labels match the selector). This naming is consistent, so you. Since Elasticsearch maintains state, we need to use StatefulSet which is a deployment that can maintain state. A replica set is a group of MongoDB deployments that maintain the same data set. Conclusion. schedulerName field of the DaemonSet. 0}. The pattern for the constructed hostname is $ (statefulset name)-$ (ordinal). The generation observed by the deployment controller. You should read about Kubernetes autoscaling - HPA. . Using ConfigMap in StatefulSet. The deployment is made up of 2 Nginx web servers; both of them are connected to a persistent volume. You can also create Pods (containers. We are going to take a deeper dive into Blue/Green as well as two more deployment strategies: Canary and A/B Testing. StatefulSet is the workload API object used to manage stateful applications. 9) is a Kubernetes resource used to manage stateful applications. Before you begin You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your. If there's heavy load, you can set up a HorizontalPodAutoscaler to. StatefulSets assign a sticky identity—an ordinal number starting from zero—to each Pod instead of assigning random IDs for each replica Pod. On-disk files in a Container are ephemeralThe value of minDomains must be greater than 0, when specified. kubectl create namespace database. They each have their own sticky identity, which they keep between. If you look at web_stateful. If you define args, but do not define a command, the default command is used with your new arguments. 1 Answer. PersistentVolumes and StatefulSets are the main approaches for running stateful applications in Kubernetes. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. Furthermore, StatefulSet comes with the capability of running replicas with stable DNS name/entries that target each replica. A Kubernetes pod is a cluster deployment unit that typically contains one or more containers. (K8S default), set the image of the container to a new version for a particular deployment. Step 3: Create and deploy the StatefulSet. serviceName property. unavailableReplicasStatefulSet is a controller in Kubernetes that allows users to manage pods the same as the deployments. apps. Each pod runs specific containers, which are defined in the spec. Like a Deployment, a StatefulSet manages Pods based on an identical container specification. yaml You should receive the following output: service/mongo created statefulset. Un StatefulSet es el objeto de la API workload que se usa para gestionar aplicaciones con estado. Note: This is not a production configuration. apiVersion: apps/v1 kind: StatefulSet # < kind of installation (statefulset vs Deployment) metadata: name: nextcloud-db # < name of the deployment namespace: nextcloud # < namespace where to place the statefulset and pods labels: app: nextcloud # < label for tagging and reference spec: serviceName: nextcloud-db-service # < name of. Kubernetes Deployments are. Deployments with three replicas all schedule simultaneously. Unlike a Deployment, a StatefulSet. The manifest files do not have the namespace added to them. Deployments offer declarative configuration to automate Pod updates and scaling. However, the best practice would be to separate the environment variables using ConfigMaps and call the ConfigMap from the StatefulSet deployment. This document describes ephemeral volumes in Kubernetes. StatefulSet is the workload API object used to manage stateful applications. It doesn't necessarily refer to the deployment of applications or services. It is the default strategy when . The following provides an example of deploying a single Kubernetes MySQL instance using Trident. The setup is also scalable. It makes sense also as each Redis instance relies on a configuration file that keeps track of other cluster instances and their roles. Otherwise you can use Deployments with multiple pods online for your shards. Each Pod in a StatefulSet derives its hostname from the name of the StatefulSet and the ordinal of the Pod. completionMode:. StatefulSets manage the creation, scaling, and deletion of pods. (PV) controllers and architectures like DaemonSet and StatefulSet which remain in operation even when Kubernetes scales and provisions cluster resources and ensures. func NewForConfigAndClient (c * rest. g. api. Provide a name for the deployment and the container image to deploy. $ kubectl apply -f statefulset. Or just strip the name out to get the index at the end. How to run stateful applications in Kubernetes. You can use kubectl create configmap with the --from-literal argument to define a literal value from the command line: kubectl create configmap special-config --from-literal=special. Get Full-Length High-Quality DevOps Tutorials for Free - Subscribe Now. 5 or later. You can use statefulsets if you want fixed pod names for your application. apps/mongo created Click Check my progress to verify the objective. The above command will create a ReplicaSet with three replicas and manage the lifecycle of the pods. kubectl create -f statefulset. StatefulSets. Update Deployment Strategies. service没有ClusterIP,是headlessservice,所以无法负载均衡,返回的都是pod名,所以pod名字都. Of course, the scaling depends on the app you are deploying. The new pods are scheduled on eligible nodes (they may not run on the same nodes as the original pods). Use this procedure to deploy a new replica set that Ops Manager. While they have similar goals of managing the lifecycle of a containerized application, they are very different in how they go about it. The stable hostname is generated from the name of the StatefulSet and the ordinal number of the pod in the set. The manifest files do not have the namespace added to them. Following the same logic, if something happens to any of the pods, it will be recreated with the same name. Several other StatefulSet features also apply to this example: StatefulSet vs Deployment In Kubernetes, a Deployment is a workload resource object that lets you configure the lifecycle of pods in the cluster. It is the default strategy when . You can also update the object's resource requests and limits, labels, and annotations. StatefulSet. ValidationError(StatefulSet. In order to save confidential data one can use a K8s resource called Secret. This name will become the basis for the ReplicaSets and Pods which are created later. Un StatefulSet es el objeto de la API workload que se usa para gestionar aplicaciones con estado. This way you could either, name the stateful-set according to the classes, i. Verifying Successful Cassandra Deployment. In contrast, annotations are not used to identify and select objects. The generation observed by the deployment controller. ReplicaSet vs. This ensures it’ll be postgres-2 that’s destroyed first. StatefulSet metadata: name: cassandra labels: app:. StatefulSet. kubectl get deployment – List one or more deployments. This is the resource KEDA will scale up/down and setup an HPA for, based on the triggers defined in triggers:. Deployment and StatefulSet are two of the most popular and powerful features of Kubernetes. The hostnames take the form of <statefulset name>-<ordinal index>. Elasticsearch is designed for cluster deployment. Each separate HPA exists for each Deployment. The StatefulSet guarantees that a given network identity will always map to the same storage identity. As developers, we learned a lot building these Operators. Introduction A StorageClass provides a way for administrators to describe the "classes" of storage they offer. Compare Kubernetes StatefulSet vs. Deployment では、全てのPodで1個のPV をマウントしている違いがあります. In Pods under Application Workloads, you can see all the Pods are up and running. In the above YAML file, we have defined a simple StatefulSet to deploy a PostgreSQL database. There are two. EKS is best suited for AWS, so it might be the best option if you are running Kubernetes on AWS. Pods (and, by extension, containers) are, nevertheless, short-lived entities. StatefulSetSpec. The volumeClaimTemplates: will be used to create unique PVCs for each replica, and they have unique naming ending. Deploy and Manages the stateless application. First, we run the service template : kubectl apply -f service. There was…It is an ordered and graceful deployment. Name: nginx-deployment Namespace: default CreationTimestamp: Sun, 02 Sep 2018 18:17:55 -0500 Labels: app=nginx Annotations:. as with deployments. k8s securityContext bypass. These are normally used instead of ReplicaSets as they are more flexible and creating a Deployment results in. Need to understand exactly how patch works. What it boils down to is that Deployment will create Pods with spec taken from the template. mourya ~ % kubectl get statefulset NAME READY AGE web 0/0 33s deepak. It is clearly explained in the documentation under Deleting the Statefulset: Deleting a StatefulSet through kubectl will scale it down to 0, thereby deleting all pods that are a part of it. g. Deployment vs Statefulset. NAME READY STATUS RESTARTS AGE patch-demo-28633765-670qr 1/1 Running 0 23s patch-demo-28633765-j5qs3 1/1 Running 0 23sLet’s deploy our first three replica Cassandra cluster on our existing AWS K8s cluster with OpenEBS. This is where PersistentVolumes come into. Deploy Elasticsearch. StatefulSet workloads. To view Resources found in a directory containing a kustomization file, run the following command: kubectl kustomize. 5 or later. spec. . The Stateful Set definition can reference a Service which gives the Pods of the Stateful Set their network identity. Before you begin StatefulSets are only available in Kubernetes version 1. It tries to ensure that the specified number of Pods from ordinal 0 through N-1 are alive and ready. It manages the deployment and scaling of a set of Pods, and provides guarantee about the ordering and uniqueness of these Pods. Statefulset vs Deployment. metadata. g. Kubernetes administrators define classes of storage, and then pods can dynamically request the specific type of storage they need.