apiVersion. 4, you should omit the --force option and use: kubectl delete pods <pod> --grace-period=0. . Deploy Replica Sets on OpenShift . Let’s use a ReplicaSet to scale up to five instances of our kuard container. The load balancer. Under the hood, Deployment creates a ReplicaSet which in turn creates pods on our cluster. selector. これらは、以下. When a ReplicaSet needs to create new Pod(s), it uses its Pod template. apiVersion: apps/v1 kind: ReplicaSet Metadata: name: some-name labels: app: some-App tier: some-Tier Spec: replicas: 3 # Here we tell k8s. As in the case of Deployment, a controller is created, but unlike Deployment, it does not create a ReplicaSet , but instead it itself creates replicas from pods and assigns them names. Query parameters; Parameter Type Description; allowWatchBookmarks. The continue option should be set when retrieving more results from the server. Mounts: <none> Volumes: <none> Conditions: Type Status Reason ---- ----- ----- Progressing True NewReplicaSetAvailable Available False MinimumReplicasUnavailable ReplicaFailure True FailedCreate OldReplicaSets: <none> NewReplicaSet: integrated-repository-webapp-d69879c5f (0/1 replicas created) Events: Type Reason Age From. You can also verify the pods running with the label tier=nginx using kubectl get pods -l tier=nginx command. Use the same way to create deployment and modify kind to ReplicaSet in the yaml file and remove fields specific to deployment. If you have recently updated your Kubernetes version and all of a sudden your YAML files stopped working, for Daemonset or for Deployment or maybe your Replicaset YAML file started giving the error: no matches for kind "DaemonSet" in version "extensions/v1beta1. Let’s use a ReplicaSet to scale up to five instances of our kuard container. The selector is used to identifying the Pods it can acquire. yml fileNow delete a pod, while watching pods: kubectl delete pod rs-quarkus-demo-mlnng. Add unique labels to the deployment's template. The ReplicaSet is a very useful basic building block in Kubernetes that other objects, like the Deployment object, rely on. The selector is used to identifying the Pods it can acquire. For Deployment, ReplicaSet, Replication Controller, only scale, if the number of existing replicas matches. The following command installs the MongoDB Enterprise Kubernetes Operator in the mongodb namespace with the optional --create-namespace option. schedulerName field of the DaemonSet. Both of them ensure that a specified number of pod replicas are running at any given time. Ways to host a MongoDB cluster on Kubernetes MongoDB is one of the most used database programs among developers. Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. 1. To add node selectors to an existing pod, add a node selector to the controlling object for that node, such as a ReplicaSet, Daemonset, or StatefulSet. apps/v1 blockOwnerDeletion: true controller: true kind: ReplicaSet name: nginx-d-5b686ccd46 uid: 7eb8fdaf-bfe7-4647-9180-43148a036184 resourceVersion: "556" More. Here the deployment type is chosen as ReplicaSet using the kind option. It's very strange. As an example, you could be deploying a MySQL database with a primary instance and two read-only replicas. I tried it with several different files and also the samples from the K8s documentation, but all result in this failure. metadata. Please attempt to capture node logs with kind create cluster --retain, kind export logs, and file an issue with the logs uploaded. See morekind: ReplicaSet. By. ReplicaSet is the next-generation ReplicationController that supports the new set-based label selector. metadata. In this case, it's set to 3. Why Deployment manages multiple ReplicaSets? The answer is Kubernetes wants to support rollback mechanism. It helps the replicaSet to identify what pods fall under it because replicaSet can also manage pods that are not created as a part of the replicaSet creation. In this article, we will look into how to connect Replicaset to a. In the above screenshot we will find out the, shortcut of that service (rs), apiVersion (apps/v1), kind (ReplicaSet) and true means its supports Namespace. metadata . In fact, you need to forget about the notion of pod. These lines are: apiVersion: apps/v1. ReplicaSet 管理所有标签匹配与标签选择器的 Pod。. With the help of deployment You can simply roll back to a previous Deployment revision. For example :While creating ReplicaSet, I am getting following error: The ReplicaSet "julrs" is invalid: spec. This will give you a detailed explanation of the resource passed as an argument as well as the fields you can populate. metadata. cat replicaset. La version de l'API apps/v1beta2 est obsolète. Here, it's a ReplicaSet. Pod template: ReplicaSet uses a pod template to create and manage the replicated pods. yml). Configuration Examples. ReplicaSet is the next-generation ReplicationController that supports the new set-based label selector. apps values should count 2 available instances. When choosing between Deployment and ReplicaSet, consider the level. Finally, the "spec" is the most important part of our YAML file. name of the ReplicaSet is part of the basis for naming those Pods. Table 7. Deployment および DeploymentConfig について. To fetch Pods with specific labels using the kubectl command, you can use the kubectl get pods command with the –selector or -l flag followed by the label selector. For example, if you want to have four pods running at all times and one of them suddenly crashes, a ReplicaSet will ensure that the crashed one is removed and will spin up a new, hopefully healthy, one. Pada Kubernetes 1. 3. To create a replica said execute the following command. When you create a ReplicaSet, you are essentially telling Kubernetes that you want a specific pod replicated x amount of times. As with just about everything related to Kubernetes, we define our ReplicaSet via a YAML file. Dans Kubernetes 1. I'll post my answer with the full code example later if no one else replies to my question. spec. Refer to the first lines of the frontend. Via a label selector, the client/user can identify a set of objects. boolean. Similarly, if the ReplicaSet discovers an extra pod in the group, it will randomly delete one of the Kubernetes replicas in circulation. The. apps | grep "0 0 0" | cut -d' ' -f 1) This only works because of the way kubectl get all displays resources. Cleanup. yaml. Deployment. StatefulSet is also a Controller but unlike Deployments, it doesn’t create ReplicaSet rather itself. 7 is the version used. A ReplicaSet ensures that a number of Pods is created in a cluster. The manifest file for a deployment looks similar to a replicaset but the kind is deployment. It is used to make sure that we have a specified number of pod replicas that are always up and running. Here, this replicaset will monitor Pods with the label tier: frontend. Here is my VS code, as you can see there are several errors, this code follows the courses code to the T. apiVersion: apps/v1 kind. Every one of them is a member of the Kubernetes ReplicaSet. Just following the documentation examples here:As per Describe Pod command listing, your Container inside the Pod has been already completed with exit code 0, which states about successful completion without any errors/problems, but the life cycle for the Pod was very short. spec is where you define the desired state and specifications for the ReplicaSet. When the control plane creates new Pods for a ReplicaSet, the . kubernetes. We will use the following YAML file to create our ReplicaSet. If you look at the above example there are two Spec’s in the manifest above. Specifying the desired number of replicas: ReplicaSet allows defining the desired number of replicas through its spec. Mounts: <none> Volumes: <none> Conditions: Type Status Reason ---- ----- ----- Progressing True NewReplicaSetAvailable Available False MinimumReplicasUnavailable ReplicaFailure True FailedCreate OldReplicaSets: <none> NewReplicaSet: integrated-repository-webapp-d69879c5f (0/1 replicas created) Events: Type Reason Age From. name of the resource to the spec. We'll try to identify the cause based on these. Discuss on Discord. Sorted by: 77. Rest all is same as the replication controller. So the correct terminology (and need) here, is to contact (micro-)service A from (micro-)service B. labels 必须匹配 . (kind: Deployment)list or watch objects of kind ReplicaSet. The name of a ReplicaSet must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. If you want to clean it manually you can just paste that in your console. kind: ReplicaSet → We have defined the kind as the replica set which helps kubectl to understand that the file is used to create a replica set. yaml. In a nutshell label selectors depend on labels to select a group of resources such as pods. revisionHistoryLimit is an optional field that specifies the number of old ReplicaSets to retain to allow rollback. The operator creates a config (and updates it) for the agent’s sidecar container responsible for configuring MongoDB in each Pod. kind: ReplicaSet → We have defined the kind as the replica set which helps kubectl to understand that the file is used to create a replica set. A Deployment owns and manages one or more ReplicaSets. The first Spec lets you declare what the ReplicaSet should appear like and the. Một ReplicaSet được định nghĩa bởi các trường bao gồm 1 selector để xác định các pod phù hợp, số lượng replicas (bản sao) cho biết số lượng pod nó cần phải duy trì và 1 pod template xác định dữ liệu của pod mới nó cần tạo ra để đáp ứng. This is the file for the ReplicaSet: apiVersion: apps/v1 kind: ReplicaSet metadata: name: myapp-replicaset labels: app: myapp spec: selector: matchLabels: env: production name: nginx replicas: 3 template: metadata: name: nginx. If a user-facing Pod fails or becomes overworked, the Deployment allocates work to a Pod from the ReplicaSet to maintain responsiveness. template is the actual pod spec with which you. More broadly defined, Kubernetes troubleshooting also includes effective ongoing management of faults and taking measures to prevent issues in Kubernetes components. But rs can do complex matching. container image using a. It also. spec can be used such as minReadySeconds, paused and more. When we deploy this replicaset it will create 3 Pods from this template. じゃあ、ReplicaSetで十分だから「Deployments」は使うことないのかというと、これは新しいバージョンのアプリをデプロイする時に役に立つ。. 1 Answer. kubectl -n middleware-db get all NAME READY STATUS RESTARTS AGE pod/example-mongodb-0 2/2 Running 0 27m pod/example-mongodb-1 2/2 Running 0 26m pod/example-mongodb-2 2/2 Running 0 24m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/example-mongodb-arb-svc ClusterIP None <none> 27017/TCP. Hence the yaml should be as below. spec 部分。. If the Labels of a. Configure an S3 bucket to use as the S3 snapshot store. We run the following command in k8s. However, We got an alert at night. 11. spec. It is responsible for maintaining the desired state of a set of pods in a cluster. This lab. It manages the deployment and scaling of a set of Pods, and provides guarantee about the ordering and uniqueness of these Pods. kind: 오브젝트 종류를 명시하는 항목으로 ReplicaSet으로 지정합니다. The following procedure describes how to configure to generate certificates for MongoDB Kubernetes Operator resources. 1. apiVersion: apps/v1 kind: ReplicaSet metadata: name: rs-app-b spec: replicas: 2 selector: matchLabels: app: app-b Describe a Scenario that We Should Use ReplicaSet Without Deployment. A ReplicaSet’s purpose is to maintain a stable set of replica. This is just a replication source instance and one (or more) asynchronous replica: This is the status of the ReplicaSet object in. 0. This is how rolling updates work - the Deployment creates a new ReplicaSet then gradually scales up the new one and scales down the old to the new until they are all on the new version. Get Pods. We have n number of different type of objects in Kubernetes, like Pods, ReplicaSet, Deployments, Services, etc. However we also want to delete the replicasets and pods that below to 'our-deployment-name'. kind: ReplicaSet → We have defined the kind as the replica set which helps kubectl to understand that the file is used to create a replica set. yml manifest and use kubectl create or kubectl apply to create the deployment. 2. template: here we specify the specs of the Pods to be created by this replicaset. Saved searches Use saved searches to filter your results more quicklyThe field is named in plural, so I assume it should be possible to define more than one set of horizon definitions. metadata. kubectl apply -f redis-pod. nodeAffinity field (if specified) is taken into consideration by the DaemonSet controller when evaluating the eligible nodes, but is. See Writing a Deployment Spec for more details. To add node selectors to an existing pod, add a node selector to the controlling object for that pod, such as a ReplicaSet object, DaemonSet object, StatefulSet object, Deployment object, or DeploymentConfig object. The Deployment creates a ReplicaSet that creates three replicated Pods, indicated by the. If you would like to have a K8s cluster locally, I would recommend using the steps from here or somewhere similar. In K8s, a ReplicaSet is an object that helps to manage and maintain a set of identical pods. boolean. The first two lines define the API version to be used (v1) and what the YAML file will be deploying (ReplicaSet). Kubernetes docs talk more about it. Below is my yaml file replicaset. Deployments and Deployment Configurations. Hence the yaml should be as below. Here name and labels are. metadata: data about object at issue. StatefulSets. metadata: It contains the metadata for the ReplicaSet, such as its name. Then, it internally creates Pods inside that ReplicaSet. The number of pods that have labels matching the labels of the pod template of the replicaset. 3. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for. Core, Mongodb. a replicaset (web-65899c769f), a pod (web-65899c769f-dhtdx). 63 <none> 443/TCP 8m54s. Both are related to the limited control that deployments provide over how an application runs: Lack of granular control. Deployments. You could see the number of ReplicaSets. {key: tier, operation: In, values:. Please remember that you should have the same number of entries in this section as the number of your replicaset members. Reading the documents it is not clear if the default behaviour should. To begin with, create an Express app first. Kind you can write code to find the Pod manager/controller depending on the type (ReplicaSet, DaemonSet, etc). apiVersion: apps/v1 kind: ReplicaSet metadata. The name of a ReplicaSet must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. Every GKE cluster has a cloud controller, which interfaces between the cluster. Similar to a ReplicationController, a ReplicaSet is a native Kubernetes API object that ensures a specified number of pod replicas are running at any given time. Table 8. We will setup a single node Kubernetes cluster on our local machine using KinD (Kubernetes in Docker). A pod is the smallest unit of deployment in Kubernetes, consisting of one or more containers that share resources and networks. In the above section, we observe that Deployment internally creates a ReplicaSet. For ReplicaSets, the kind is always a ReplicaSet. The user can specify a different scheduler for the Pods of the DaemonSet, by setting the . In the above screenshot we will find out the, shortcut of that service (rs), apiVersion (apps/v1), kind (ReplicaSet) and true means its supports Namespace. A ReplicaSet (RS) is a Kubernetes object that ensures there is always a stable set of running pods for a specific workload. Create a deployment via kubectl run, as shown below. Does Kubernetes GET API actually support fieldSelector parameter to query values of array fields?. npm init && npm i express --save. Kubernetes manages the relationship between Pods and Services using Labels and Selectors . The IP address generated from the Load balancer SVC should be bound to the domain names mentioned in the replicaSetHorizons, for example: mongo-replicaset-0. metadata. kubectl delete pods <pod> --grace-period=0 --force. It default to 1 if it was not. In this article. 4. Replication Controller and Replica Set do almost the same thing. When the control plane creates new Pods for a ReplicaSet, the . These manifests should result in the creation of two pods as part of the hello-world ReplicaSet, and a hello-world service resource with an external-facing load balancer, if the cloud provider and cluster network supports it. name of the ReplicaSet is part of the basis for naming those Pods. youbudong Update go. yaml example for guidance. error: unable to recognize "kubia-replicaset. The difference comes with the usage of selectors to replicate pods. If a user-facing Pod fails or becomes overworked, the Deployment allocates work to a Pod from the ReplicaSet to maintain responsiveness. By default, Kubernetes Operator uses the default namespace. Query parameters; Parameter Type Description; allowWatchBookmarks. Clients should not assume bookmarks are. As you said, you created 3 web based micro-service. Yes, that's right. Create a ReplicaSet. The number of replicas is 3. ReplicaSet. Does anyone know what I need to do in order to write successfully? This cluster is a 3-node replicaset with one primary and two secondaries. . Based on the configuration you deployed with, both the deployment. For ReplicaSets, the kind is always a ReplicaSet. 26. What did you expect? Mongodb-agent ready and cluster OKFor ReplicaSets, the kind is always a ReplicaSet. deployment "my-nginx" created. spec. kind: ReplicaSet metadata: name: 1st-replicaset spec: podSelector: matchLabels: app: Web-app replicas: 5. the ReplicaSet controller cant directly interact with Pods to perform exec or requests (only the kubelet can) possible workaround (might be too complex): the ReplicaSet controller chooses the Pods in the sample; the ReplicaSet controller "marks" these Pods to be probed; the kubelet probes the Pods and creates a Pod-event with the. A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. selector ,否则它将被 API 拒绝。. $ kubectl run my - nginx -- image = nginx. Saved searches Use saved searches to filter your results more quicklyFor instance, ReplicaSet invalidates its cache when the selector changes. kind: ReplicaSet. string. - apiVersion: apps/v1 kind: ReplicaSet name: router-default-66d5cf9464 uid: d81dd094-da26-11e9-a48a-128e7edf0312 controller: true blockOwnerDeletion: true. この章では、Kubernetes の基本的なオブジェクトと機能について説明します。. I'm creating a service of type LoadBalancer to access the MongoDB replica set from outs. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: rep-with-vol2 spec:. The operator creates a Pod with one init container and two app containers on it. it uses the selector and the label from pod spec to identify the actual pods running and is matched against the desired count. I am pretty new to Kubernetes Whenever one of theStep 1: Create ReplicaSet in Kubernetes Using YAML File. To set deployment resources, choose one of the above options. The difference comes with the usage of selectors to replicate pods. a number of replicas indicating how many Pods it should be maintaining. Figure 13. Then create a Deployment object by running the following command: 1. As per the name, ReplicaSet is used for managing the replicas of our pods. A new ReplicaSet is created and the Deployment manages moving the Pods from the old ReplicaSet to the new one at a controlled rate. Query parameters; Parameter Type Description; allowWatchBookmarks. For ReplicaSets, the kind is always a ReplicaSet. labels 必须匹配 . For example. 5. yaml": no matches for apps/, Kind=ReplicaSet . (kind: ReplicaSet) ReplicaSet (rs) functions are almost identical to ReplicationController. Building on replication controllers, OpenShift Container Platform adds expanded support for the software development and deployment lifecycle with the concept of DeploymentConfig objects. In Kubernetes 1. 8. Hi @qing , . The name of a ReplicaSet must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. このリソースは直接使用することは少ないが、次に出てくるDeploymentを抑える上で理解が進むのでやっていこう。. Labels are like tags that identify and categorize Kubernetes objects. 2. I tried it with several different files and also the samples from the K8s documentation, but all result in this failure. For example a deployment selects a group of pods by a. apiVersion: apps/v1 kind: Deployment metadata: name. I’ve been trying to deploy a ReplicaSet with YAML. ObservedGeneration reflects the generation of the most recently observed ReplicaSet. e. - kubernetes-exercises/replica_set. Kubernetes对象之Pod. ReplicationController can only match a label with a value (As we saw in rs’s example). The name of a ReplicaSet must be a valid DNS subdomain value, but this can produce unexpected 对于 ReplicaSet 而言,其 kind 始终是 ReplicaSet。然后,ReplicaSet 也需要 . As with all other Kubernetes API objects, a ReplicaSet needs the apiVersion, kind, and metadata fields. com, mongo-replicaset-2. Kubernetes Replication Controller vs Deployment Deployments are intended to replace Replication Controllers. kubectl delete $ (kubectl get all | grep replicaset. Here in our case it is ReplicaSet. The pods have been labeled with the pod-template-hash, and one of them was the pod created at the beginning of the test, and there are 2. Use the kubectl create and kubectl apply commands to create ReplicaSets. The following command installs the MongoDB Enterprise Kubernetes Operator in the mongodb namespace with the optional --create-namespace option. I have a pod in my EKS cluster and I want to edit it's yaml so that I can change the read-only values from true to false. The spec part is mandatory in the ReplicaSet object. 对于 ReplicaSet 而言,其 kind 始终是 ReplicaSet。 当控制平面为 ReplicaSet 创建新的 Pod 时,ReplicaSet 的 . The number of pods that have labels matching the labels of the pod template of the replicaset. spec. Sorted by: 18. For example, if you want to have four pods running at all times and one of them suddenly crashes, a ReplicaSet will ensure that the crashed one is removed and will spin up a new, hopefully healthy, one. When the control plane creates new Pods for a ReplicaSet, the . net core web application that gets some information from MongoDB replica set but from time to time I'm getting a timeout errors. Here is an example ConfigMap object using the output from ssh-keyscan above: The argocd-ssh-known-hosts-cm ConfigMap will be mounted as a volume at the mount path /app/config/ssh in the pods of argocd-server and argocd-repo-server. mongodbResourceRef. spec. When the control plane creates new Pods for a ReplicaSet, the . The Kubernetes Operator uses split horizon DNS for replica set members. yaml file are mounted in the Prometheus container in the /etc/config folder. 92. This will tell you what "owns" the pod. Template is not a list ( so you are overwriting the template), instead you just need one template for the pod creation , and inside the pod you will have multiple containers then. The above RS manifest file uses a ReplicaSet to run three copies of the my-image: latest container image. If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Using a ReplicaSet: Non-Aware Application. 4. It's mainly used by Deployment as a. Consider this: The pods are not directly managed by a deployment, but a deployment manages a ReplicaSet. Asking for help, clarification, or responding to other answers. A ReplicaSet is a Kubernetes controller that keeps a certain number of Pods running at any given time. A ReplicaSet is a set of identical backup Pods maintained on the backend side to ensure a Pod is always available. Step 1. name field. metadata: name: my-replicaset. Table 10. The selector and matchingLabels is used by the replicaset to monitor other pods as well who have the matching labels. For ReplicaSets, the kind is always a ReplicaSet. ReplicaSetCondition describes the state of a replica set at a certain point. We need k8s to automatically start a pod if the pod prematurely dies or when a node failure happens. Metadata:-it contains the information related to ReplicaSet. 在旧版本的Kubernetes中,只有ReplicationController对象。. apps | grep "0 0 0" | cut -d' ' -f 1) This only works because of the way kubectl get all displays resources. Overview & Architecture Edit. list or watch objects of kind ReplicaSet. This is different from vertical. In Kubernetes, Admission Controllers enforce policies on objects during create, update, and delete operations. Admission control is fundamental to policy enforcement in Kubernetes. metadata: name: my-replicaset. 它的主要作用是 确保Pod以你指定的副本数运行 ,即如果有容器异常退出,会自动创建新的 Pod 来替代;而异常多出来的容器也会. Try using one envFrom with multiple entries under it as below: - name: integration-app image: my-container-image envFrom: - secretRef: name: intercom-secret - secretRef: name: paypal-secret - secretRef: name: postgres-secret - secretRef: name: redis-secret. ReplicaSet YAML. ReplicaSet There is no direct way I could find to create this from kubectl. ReplicaSet :同じ仕様のPodを期待する数に維持するオブジェクト. apps/my-rs created $ kubectl get pods NAME READY STATUS RESTARTS AGE my-rs-2fncm 1/1 Running 0 10s my-rs-4dlvl 1/1 Running 0 10s my-rs-bb698 1/1 Running 0 10sReplicaSet 的目的是维护一组在任何时候都处于运行状态的 Pod 副本的稳定集合。 因此,它通常用来保证给定数量的、完全相同的 Pod 的可用性。 ReplicaSet 的工作原理 RepicaSet 是通过一组字段来定义的,包括一个用来识别可获得的 Pod 的集合的选择算符、一个用来标明应该维护的副本个数的数值、一个. spec. With the taint in place, pods cannot be scheduled on the master. yaml": no matches for apps/, Kind=ReplicaSet. name of the ReplicaSet is part of the basis for naming those Pods. In the future, when we update the current deployment, it will create a new ReplicaSet. labels: my-label: my-value. # kubectl delete rs soaktestrs replicaset "soaktestrs" deleted # kubectl get pods Again, the pods that were created are deleted when we delete the Replica Set. This will likely be a ReplicaSet (which is generated by the Deployment). template. Writing a ReplicaSet manifest. as this one is by default required to create replica-set in k8s. func NewForConfigAndClient (c * rest. The name of a ReplicaSet must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. metadata includes the name for the ReplicaSet, which is "my-replicaset". As you can see, it uses the apps/v1 API version, the kind is ReplicaSet, and in this case the name is set to hello-world_v1. Kind: Defines the resource as a ReplicaSet for the Kubernetes API. Once the Operator is installed, we can go ahead and deploy MongoDB. 1 Answer. 第5章 Deployment. A ReplicaSet represents a group of Pod replicas (exact copies of a Pod). selector: matchLabels: my-label: my-value. apiVersion: apps/v1 kind: ReplicaSet # this defines to create the object of replication type metadata: name: nginx spec: replicas: 3 # the element defines the desired number of pods selector:. To do this we will write a YAML configuration. In this case, the selector specifies that it should match pods based. Trong định nghĩa spec trên thì “kind: ReplicaSet” là tên đối tượng Kubernetes mà chúng ta cần tạo với name và các Label được gán cho đối tượng ReplicaSet này được định nghĩa trong phần metadata. This name will become the basis for the ReplicaSets and Pods which are created later. #Get list of Pods kubectl get pods kubectl describe pod <pod-name> # Get list of Pods with Pod IP and Node in which it is running kubectl get pods -o wide Also, the apiVersion of replicaSet is apps/v1. I couldn't figure, whether the issue is with my code or api resources.