Monday, 2 November 2020

Top Interview Question on Kubernetes for SDET/Devops Set-03? ReplicaSet in K8S

















 
1. How to create a ReplicaSet?
kubectl create -f replicasetrs-test.yml

2. How to get list of ReplicaSet?

kubectl get replicaset

3. How to describe newly created ReplicaSet?
kubectl describe rs/<replicaset-name>  Kubernetes Deployment related commands:
  Click here for commands

4. How we can verify owner of the Pod?

kubectl get pods <pod-name> -o yaml

Check the
"name" tag under
"ownerReferences"

5. How to expose replica set as a service?


kubectl expose rs <ReplicaSet-Name> --type=NodePort --port=80 --target-port=8080 --name=<ServiceName>

 Click for Job Openings and Apply
6. How to delete replica set?

kubectl delete rs <ReplicaSet-Name>

10. Commands for kubernetes POD?
 Cick Here for answer 
 
7. What is the use of replica set?

A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods.

8. What is POD Selector?


The.spec.selector label selector.These are the labels which is used to identify potential Pods to acquire.In the ReplicaSet, .spec.template.metadata.labels must match spec.selector, or it will be rejected by the API.


9. How to set number of pods concurrently?

You can specify how many Pods should run concurrently by setting .spec.replicas. The ReplicaSet will create/delete its Pods to match this number.If you do not specify .spec.replicas, then it defaults to 1.

REVISION:
10. How to kill the existing pods and recreate new pods in a rolling fashion?

kubectl rollout restart deployment/<Deployment-Name>

11. How to pause the deployment?

kubectl rollout pause deployment/<Deployment-Name>
12. Get the rollout history of deployment?

kubectl rollout history deployment/<Deployment-Name>

13. How to edit the deployment?
Click Here For Answer
14. How to create deployment in Kubernetes?
kubectl create deployment <Deplyment-Name> --image=<Container-Image>

Want to learn more? ...Check below link for more java interview question:

**************************************************

SeleniumWebdriver Automation Testing Interview Questions:

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

No comments:

Post a Comment

All Time Popular Posts

Most Featured Post

Introduction to Web Testing with Playwright

  Introduction to Web Testing with Playwright 📌  Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 📌  YouTube channel:  https://lnkd.in/gGUG...