Steps to create a Replication Controller using the kubectl command

Create a Replication Controller using the kubectl command

Steps to create a Replication Controller using the kubectl command

In this blog, we will show the Steps to create a Replication Controller using the kubectl command 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.

 

CREATING REPLICATION CONTROLLER USING KUBECTL

  • Login to the Master node through putty.

Steps to create a Replication Controller using the kubectl command

 

  • use the below command, to create replication controller POD.

Syntax: kubectl run <name for the replication controller> --image=<image name> --generator=run/v1

Example: kubectl run web-rc --image=nginx --port=80 --generator=run/v1

Steps to create a Replication Controller using the kubectl command

 

  • In few seconds, replication controller created successfully.

Steps to create a Replication Controller using the kubectl command

 

  • You can verify the replication controller through describe command.

kubectl describe replicationcontroller web-rc

Steps to create a Replication Controller using the kubectl command

 

 

SCALING UP THE POD REPLICAS

  • By default, it will create only one POD if we do not specify the replica set numbers. You can verify it by listing the pods.

kubectl get pods

Steps to create a Replication Controller using the kubectl command

 

  • Use the below command to increase the replica set.

Syntax: kubectl scale <resource type> <replication controller name> --replicas=<number of required replicas>

Example: kubectl scale replicationcontroller web-rc --replicas=3

Steps to create a Replication Controller using the kubectl command

 

  • The command executed successfully.

Steps to create a Replication Controller using the kubectl command

 

  • We can able to see two more pods are in starting status.

Steps to create a Replication Controller using the kubectl command

 

  • We can find the pods events through describe command.

kubectl describe pods web-rc-t5w6z

Steps to create a Replication Controller using the kubectl command

 

Steps to create a Replication Controller using the kubectl command

 

  • After few seconds, all the pods will be in running status.

Steps to create a Replication Controller using the kubectl command

 

SCALING DOWN THE POD REPLICAS

  • We can use the same kubectl scale command with less replica set.

kubectl scale replicationcontroller web-rc --replicas=1

Steps to create a Replication Controller using the kubectl command

 

  • It will scale down to one POD.

Steps to create a Replication Controller using the kubectl command

 

  • You can see the PODS are terminating using kubectl get pods command.

Steps to create a Replication Controller using the kubectl command

 

  • After few seconds, you can have only one POD in the replica set.

Steps to create a Replication Controller using the kubectl command

 

VIDEO

Thanks for reading this blog. We hope it was useful for you to learn about creating replication set using the kubectl command.

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn
More Interested Related Posts
zfs pool usage

ZFS Pool and Dataset Usage

ZFS Pool and Dataset Usage   I am back with another blog to provide the useful script to the Freebsd users to determine the zpool

Assistanz Networks

Installing Zabbix Agent in FreeBSD 12.0

Zabbix Agent Installation and Configuration Guide on FreeBSD 12.0   Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual

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