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

Docker Commands Kubernetes Architecture: Don't Forget!

This document provides cheat sheets for Docker and Kubernetes commands as well as a glossary of Kubernetes terms. The Docker commands section lists commands for building an image, pushing an image to Docker Hub, listing running containers, and running/stopping a container. The Kubernetes commands section lists commands for applying configuration files, restarting deployments, getting namespaces/pods, and deleting objects. The glossary defines Kubernetes concepts like clusters, nodes, containers, images, load balancers, and pods.

Uploaded by

Mohit Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Docker Commands Kubernetes Architecture: Don't Forget!

This document provides cheat sheets for Docker and Kubernetes commands as well as a glossary of Kubernetes terms. The Docker commands section lists commands for building an image, pushing an image to Docker Hub, listing running containers, and running/stopping a container. The Kubernetes commands section lists commands for applying configuration files, restarting deployments, getting namespaces/pods, and deleting objects. The glossary defines Kubernetes concepts like clusters, nodes, containers, images, load balancers, and pods.

Uploaded by

Mohit Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

S04E03 Introduction to Microservices with .

Net and K8S – Cheat Sheet

Docker Commands Kubernetes Architecture


Don’t forget!
Build an Image

docker build -t <docker user id>/<image name>:<version> .

Push an Image to Docker Hub

docker push <docker user id>/<image name>:<version>

List Running Docker Containers

docker ps

Run a Docker Image

docker run -p <external port>:<internal port> -d <docker user id>/<image name>

Stop A Running Container

docker stop <container Id>

Re-start a Container

docker start <container Id>

Kubernetes Commands
Apply a “File” (E.g. a Deployment.yaml)

Kubectl apply -f <name of yaml file> Glossary


Restart Deployment
Cluster: Contains a set of "worker machines" called Nodes. Every cluster has at least 1 node.
Kubectl rollout restart deployment <name of deployment>
Cluster IP: A Service that exposes the container "internally" within the Cluster.
Get All Namespaces

Kubectl get namespace Container: An image that has been executed, containing the app and it's dependencies.
Get Pods in a Namespaces Image: The result of building an app and it's dependencies. Images are transferable units.
Kubectl get pods –namespace=<name of namespace>
Load Balancer: A Service that exposes a container externally.
Get All “Objects” (E.g. Get All Pods)
Node: A Node is "worker machine" that runs containerized applications.
Kubectl get <object type>
Node Port: A Service used for development purposes to expose containers externally.
Delete an “Object” (E.g. Delete a Deployment)

Kubectl delete <object type> <object name> Pod: Smallest K8S object. Represents a set of running containers.

dotnetplaybook.com

You might also like