assistanz
Assistanz

Steps to create a Replication Controller using YAML

Steps to create a Replication Controller using YAML

In this blog, We will show you the Steps to create a Replication Controller using YAML in 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.

REPLICATION CONTROLLER CREATION

  • Log in to the kubernetes master server through putty.

Steps to create a Replication Controller using YAML

  • Create a YAML file using the default editor.

Steps to create a Replication Controller using YAML

  • Add the below coding and save it.
apiVersion: v1 kind: ReplicationController metadata:     name: rep-pod spec:     replicas: 4     selector:        app: web        env: test     template:        metadata:           labels:              app: web              env: test        spec:           containers:           - name: rep-cont             image: nginx

 

Steps to create a Replication Controller using YAML

  • Execute the below command to create a replication controller using YAML file.

Syntax: kubectl apply -f

Example: kubectl apply -f rc.yml

Steps to create a Replication Controller using YAML

  • Command executed successfully.

Steps to create a Replication Controller using YAML

  • All the PODs will be in creating status.

Steps to create a Replication Controller using YAML

  • After few seconds, all the PODs are in running status.

Steps to create a Replication Controller using YAML

VERIFYING REPLICATION CONTROLLER

  • Use the below command to view the list of replication controllers.

kubectl get rc

Steps to create a Replication Controller using YAML

Note: rc is the short-hand of replication controller

  • Describe command will use to view the detailed information about the replication controller.

Syntax: kubectl describe rc

Example: kubectl describe rc rep-pod

Steps to create a Replication Controller using YAML

Steps to create a Replication Controller using YAML

DELETING THE REPLICATION POD

  • Currently, there are four POD’s available in our demo replication controller.

Steps to create a Replication Controller using YAML

  • Let’s delete a POD and see how kubernetes reacts.

Steps to create a Replication Controller using YAML

  • Kubernetes will start creating a new POD automatically. Kubernetes will keep on checking the desired state. When the desired state fails, kubernetes takes own action to restore the state.

Steps to create a Replication Controller using YAML

  • After few seconds, the new POD is in running status and replaced the old one.

Steps to create a Replication Controller using YAML

Steps to create a Replication Controller using YAML

EXTERNAL LINKS

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

VIDEO

Thanks for reading this blog. We hope it was useful for you learn about creating a replication controller using YAML file in the kubernetes environment.

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