0% found this document useful (0 votes)
32 views

Kubernete Commands

This document provides Kubernetes commands for getting and managing nodes, pods, and replication controllers. It includes commands for listing, describing, creating, and deleting each resource type. It also provides an example pod manifest and suggests creating a pod using the nginx image as an exercise.

Uploaded by

PRANAV CHAUDHARI
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Kubernete Commands

This document provides Kubernetes commands for getting and managing nodes, pods, and replication controllers. It includes commands for listing, describing, creating, and deleting each resource type. It also provides an example pod manifest and suggests creating a pod using the nginx image as an exercise.

Uploaded by

PRANAV CHAUDHARI
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Kubernets

node commands
get the list of nodes

> kubectl get nodes

get details of a selected node

> kubectl describe node <node name>

pod commands
get the list of all pods

# get the basic details


> kubectl get pods

# get more details like ip address


> kubectl get pods -o wide

create a basic pod

apiVersion: v1
kind: Pod
metadata:
name: pod1
spec:
containers:
- name: pod1-container
image: httpd

> kubectl create -f <file name>

get the details of a pod

> kubectl describe pod <pod name>


delete a pod

> kubectl delete pod <pod name>

replication controller commands


get the list of replication controllers

> kubectl get replicationcontroller


> kubectl get rc

get details of selected controller

> kubectl describe replicationcontroller <name>


> kubectl describe rc <name>

delete selected replication controller

> kubectl delete replicationcontroller <name>


> kubectl delete rc <name>

exercise
create a pod with image nginx

You might also like