assistanz
Assistanz

Steps to create Replica sets in the Kubernetes

In this blog, we will show you the Steps to create Replica sets in the Kubernetes environment.

REQUIREMENTS

  • 2 Node Cluster ( 1 Master VM with 2 Nodes)
  • Kubernetes Components

INFRASTRUCTURE OVERVIEW

  • We have already installed and configured the 2 Node cluster in our demo environment.

PODS OVERVIEW

  • Currently, there are four orphan PODS which was created using the replication controller.

Steps to create Replica sets in the Kubernetes

  • All the POD’s are labeled with app=web env=test.

  • We will show you how to add the orphan pods into a Replica Set.

REPLICA SET BENEFITS

Steps to create Replica sets in the Kubernetes

CREATING A NEW REPLICA SET

  • From the master node, open the default text editor.

  • Add the below script in the YML file.
apiVersion: apps/v1beta2
kind: ReplicaSet
metadata:
    name: rs-web
spec:
    replicas: 4
    selector:
       matchLabels:
          app: web
    template:
       metadata:
          labels:
             app: web
             env: test
       spec:
          containers:
          - name: rs-pod
            image: nginx

  • Save and close the file.
  • Use the below command to create a new replica set.

kubectl apply -f rs.yml

  • A new replica set is created successfully.

VERIFYING THE REPLICA SET

  • Use the below command to view the list of replica set available in your environment.

kubectl get rs

Steps to create Replica sets in the Kubernetes

  • It added the orphan pods into the replica set. Also, it has not created any additional pods for the replica set.

Steps to create Replica sets in the Kubernetes

  • We can also describe the replica set using the below command.

Syntax: kubectl describe rs <replica set name>

Example: kubectl describe rs rs-web

Steps to create Replica sets in the Kubernetes

  • There are more expressions available for the replica set and will share that information in future blogs.

 

REFERENCE

https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/

 

Thanks for reading this blog. We hope it was useful for you to learn to about the steps to create Replica sets in the Kubernetes

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support