assistanz
Assistanz

Steps to create your First POD in Google Kubernetes

Steps to create your First POD in Google Kubernetes

Steps to create your First POD in Google Kubernetes

In this blog, we will show you the steps to create your first POD in Google 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.
 

WORKING WITH PODS

  • The smallest unit of scheduling in the kubernetes world is POD.
  • POD’s can contain one or more containers.
  • We deploy a POD in a cluster using the manifest file.
  • We provide the manifest file to the API server. It will schedule to deploy in a node. Based on the manifest file, the POD will have one (or) more containers.
  • irrespective how many containers inside a POD, the POD will get only a single IP. It’s like one IP to one POD relationship.
  • Every container inside a POD shares single Network Namespace.
  • All the containers inside a POD shares same CGROUP Limits, Volumes, Network and IPC namespaces.

INTER-POD COMMUNICATION

  • All the POD addresses are fully routable on the POD Network.
  • Every POD gets own IP and it’s routable to that Network.
  • POD’s can communicate each other without any port mapping.

INTRA-POD COMMUNICATION

  • Inside the POD, the multiple containers will communicate through a shared local network interface.
  • The containers will be available outside the POD by exposing them through ports.
  • Two containers cannot use the same port.
  • Pods will either run as fully functional (or) its down completely.

POD LIFECYCLE

  • First, we will create a manifest file (YAML or JSON) about POD and container information.
  • Provide the manifest file to the API server and it will get scheduled to a node.
  • Once its schedule, it goes into Pending state. During this time it will be downloading the images and files.
  • It will be in pending state till all the containers are up and running.
  • After the containers are up and running, It changes to running state.
  • Once it’s completed its job, its change the status to succeed.
  • If it’s holding on pending state (or) Crashed for a long time, then it will be changed to a failed state.
  • We cannot bring back the death POD. Need to replace them with a new one.


Kubernetes

CREATING A MANIFEST FILE

  • Log in to the Kubernetes master server through putty.
Steps to create your First POD in Google Kubernetes
  • Create a new manifest file using vi editor.
Note: We are using YAML type to create the manifest files
Steps to create your First POD in Google Kubernetes
  • We are using the ngnix image for this demo purpose. Add the below code in the YAML file.
apiVersion: v1 kind: Pod metadata:    name: hello-pod    labels:       zone: pod       version: v1 spec:    containers:       - name: hello-ctr         image: nginx:latest
  Steps to create your First POD in Google Kubernetes
  • Save and close the file.
Note: Make sure that manifest will be on right YAML format. Or else, it will show the error during POD deployment.
 

DEPLOYING THE POD

  • From the shell, use the below command to create a pod.
kubectl create -f pod.yml Steps to create your First POD in Google Kubernetes
  • A new POD will be created in few seconds.
Steps to create your First POD in Google Kubernetes
  • We can get the pods status using the below command.
kubectl get pods Steps to create your First POD in Google Kubernetes
  • You can also get the POD events information through describe command.
kubectl describe pods Steps to create your First POD in Google Kubernetes Steps to create your First POD in Google Kubernetes
  • You can find the POD IP using wide option.
kubectl get pods -o wide
  • We can able to browse the container using the POD IP inside the cluster.
curl -v http://<Pod IP> Steps to create your First POD in Google Kubernetes EXTERNAL LINKS https://www.mirantis.com/blog/introduction-to-yaml-creating-a-kubernetes-deployment/ – YAML Introduction. VIDEO Thanks for reading this blog. We hope it was useful for you to learn about POD creation on Google 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