WE CODE NOW
  • Home 
  • Blog 
  • Guides 
Guides
  1. Home
  2. Guides
  3. Linux Command Series
  4. Kubernetes Basics in Linux

Kubernetes Basics in Linux

Posted on June 1, 2024  (Last modified on June 8, 2024) • 2 min read • 227 words
Linux
 
Kubernetes
 
Minikube
 
Pods
 
Deployment
 
Linux
 
Kubernetes
 
Minikube
 
Pods
 
Deployment
 
Share via

Learn the basics of Kubernetes in Linux, including setting up a local Kubernetes cluster with Minikube, deploying applications, and managing pods.

On this page
  • Setting Up Minikube
    • Installing Minikube
    • Starting Minikube
    • Checking Minikube Status
  • Deploying Applications
    • Creating a Deployment
    • Exposing the Deployment
    • Accessing the Service
  • Managing Pods
    • Listing Pods
    • Describing a Pod
    • Deleting a Pod
  • Conclusion

Kubernetes Basics in Linux  

Kubernetes is a powerful tool for container orchestration. This guide covers the basics of Kubernetes in Linux, including setting up a local Kubernetes cluster with Minikube, deploying applications, and managing pods.

Setting Up Minikube  

Installing Minikube  

Install Minikube on your Linux system.

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube
sudo mv minikube /usr/local/bin/

Starting Minikube  

Start a local Kubernetes cluster with Minikube.

minikube start

Checking Minikube Status  

Check the status of your Minikube cluster.

minikube status

Deploying Applications  

Creating a Deployment  

Create a deployment using kubectl.

kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4

Exposing the Deployment  

Expose the deployment to create a service.

kubectl expose deployment hello-minikube --type=NodePort --port=8080

Accessing the Service  

Get the URL of the service.

minikube service hello-minikube --url

Access the service using the provided URL.

Managing Pods  

Listing Pods  

List all running pods.

kubectl get pods

Describing a Pod  

Describe a specific pod to get detailed information.

kubectl describe pod pod_name

Deleting a Pod  

Delete a pod by name.

kubectl delete pod pod_name

Conclusion  

Kubernetes is a powerful platform for managing containerized applications. Setting up a local Kubernetes cluster with Minikube, deploying applications, and managing pods are essential skills for working with Kubernetes in Linux. Practice these basics to effectively use Kubernetes in your development and deployment workflows.

 Docker Basics in Linux
On this page:
  • Setting Up Minikube
    • Installing Minikube
    • Starting Minikube
    • Checking Minikube Status
  • Deploying Applications
    • Creating a Deployment
    • Exposing the Deployment
    • Accessing the Service
  • Managing Pods
    • Listing Pods
    • Describing a Pod
    • Deleting a Pod
  • Conclusion
Copyright © 2024 WE CODE NOW All rights reserved.
WE CODE NOW
Link copied to clipboard
WE CODE NOW
Code copied to clipboard