Tuesday, 22 February 2022

Pods- Creating pods using Command

 Creating a Pod using Command

kubectl run

Run a particular image on the cluster.

Synopsis

Create and run a particular image, possibly replicated. Creates a deployment or job to manage the created container(s).

kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...]

Deploying Nginx pods on Kubernetes


Note: pod Shortcode = po

  1. Deploying Nginx Container

    kubectl create deploy nginx --image=nginx --replicas=3 --port=80
    kubectl get pods
    kubectl get deployments

No comments:

Post a Comment

TASK D: Kubernetes Deployment (k3s on EC2) — Step-by-Step Guide

  Overview In this task, you deploy the HealthPulse Portal to a  real Kubernetes cluster  running on AWS EC2 instances. You'll use  k3s ...