daton's mac
  • Introduction
  • Hackintosh
    • Requirements
    • Prepare USB Drive
    • Install OSX
    • Post installation
    • WiFi and Bluetooth PCI device
    • System Updates
    • Keyboard Mapping
    • Troubleshooting
  • Windows with WSL
    • Setup for Node.js
    • LinuxBrew
    • Powershell
    • WSL bash and zsh
  • Xcode
  • Homebrew
  • iTerm2
    • Plugins
  • Gifox
  • Node.js
    • Webpack
  • VS Code
  • SSH
  • Git
  • GitKraken
  • Docker
    • Remove Docker things
    • Env vars
    • Frequently used commands
  • Docker on Windows
  • MongoDB
  • Postgres
  • Sentry
  • Redis
  • Ghostscript and Imagemagick
  • Codeanywhere
  • Terraform
  • Kubernetes
    • Helm
    • Docker Desktop for Mac
    • Kubernetes on DigitalOcean
    • K8S with Traefik as IC
    • Kubernetes managed by StackPointCloud
    • Use Docker Images from Private Registry
    • Use a minikube locally
  • Web Apps
  • IoT
  • NVIDIA
Powered by GitBook
On this page
  • Prerequisites
  • Useful commands
  • Deployments and status
  • Clean up cluster

Kubernetes

PreviousTerraformNextHelm

Last updated 5 years ago

Prerequisites

Use the Kubernetes command-line tool, , to deploy and manage applications on Kubernetes. Using kubectl, you can inspect cluster resources; create, delete, and update components; look at your new cluster; and bring up apps.

For development and practice you can use a Minikube cluster, but it only intended for testing without pay for a cluster in a provider.

Useful commands

Deployments and status

Start deployment:

kubectl apply -f nginx-deployment.yaml

Check the status of a deployment:

kubectl rollout status deployments nginx-deployment
kubectl get deployments
kubectl describe deployments nginx-deployment
kubectl rollout history

Then check the status of pod:

kubectl get pods
kubectl describe pods nginx

Clean up cluster

You might need to clean up it when you work with it.

Delete all pods:

kubectl delete pods --all

Delete all services:

kubectl delete services --all

Delete all deployments:

kubectl delete deployments --all

Delete all replicasets:

kubectl delete replicasets --all

Delete all:

kubectl delete daemonsets,replicasets,services,deployments,pods,rc --all
kubectl
Install ToolsKubernetes
Logo