Kubernetes useful commands
kubectl create -f app.yaml
kubectl describe pods
kubectl describe nodes
kubectl get deployments
kubectl logs <pod name>
kubectl get pv --sort-by=.spec.capacity.storage
# Mark my-node as unschedulable
kubectl cordon my-node
# Drain my-node in preparation for maintenance
kubectl drain my-node
# Mark my-node as schedulable
kubectl uncordon my-node
# Show metrics for a given node
kubectl top node my-node
# Display addresses of the master and services
kubectl cluster-info
# Dump current cluster state to stdout
kubectl cluster-info dump
# Dump current cluster state to /path/to/cluster-state
kubectl cluster-info dump --output-directory=/path/to/cluster-state
#logging to the node
kubectl exec node-name -it -- /bin/bash
References
- Kubernetes CLI environment how it works, https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/
- Kubernetes PODs documentation https://kubernetes.io/docs/concepts/workloads/pods/
- Kubernetes cheatsheet, https://kubernetes.io/docs/reference/kubectl/cheatsheet/
- Scheduler, https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/
- Kube CronJob, https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax
- Oracle Cloud documentation on Kubernete deployment https://docs.oracle.com/en-us/iaas/developer-tutorials/tutorials/spring-on-k8s/01oci-spring-k8s-summary.htm
- Kubernete API documentation https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#-strong-api-overview-strong-
- Kubernete Reference Documentation https://kubernetes.io/docs/reference/
- IBM Kubernete Reference Documentation https://cloud.ibm.com/docs/containers?topic=containers-app
- Kubernete Reference Documentation on Deployment, CLI commands, https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
- Google cloud Kubernete deployment, https://cloud.google.com/kubernetes-engine/docs/concepts/deployment
- Kubeternetes Cronjob with tasks https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/
- Kubernets Cronjob https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
- Configure a Pod to use a ConfigMap https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/
- Docker Deployment to Kubernetes https://docs.docker.com/get-started/kube-deploy/
- Ephemeral Containers https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/
- Docker volume in Kubernetes Cluster https://stackoverflow.com/questions/72379136/docker-volume-on-kubernetes-cluster
- Multiple Volume Maps in Kubernetes https://stackoverflow.com/questions/35443649/multiple-volume-mounts-with-kubernetes-one-works-one-doesnt
- Kubernetes Volume https://kubernetes.io/docs/concepts/storage/volumes/
- Kubernets Storage/Volume https://kubernetes.io/docs/concepts/storage/
- Kubernetes Kubectl commands list https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#explain
- Kubetnetes Dashboard https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/