Skip to main content

Common K8S Commands

Status Check​

# Check docker status
systemctl status docker.service
# Check kubelet status
systemctl status kubelet.service
# Check kubelet port
netstat -antp| grep 6443
netstat -pnlt | grep 6443
# View system log
tail -200f /var/log/messages
#
kubectl get cs

Restart Command​

systemctl restart docker.service
systemctl restart kubelet.service
systemctl restart kubelet
[root@master01 ~]# wget https://docs.projectcalico.org/v3.14/manifests/calico.yaml --no-check-certificate
Output….
[root@master01 ~]# ls
anaconda-ks.cfg calico.yaml

Cleanup Command

Agreement
The code part of this work is licensed under Apache License 2.0 . You may freely modify and redistribute the code, and use it for commercial purposes, provided that you comply with the license. However, you are required to:
  • Attribution: Retain the original author's signature and code source information in the original and derivative code.
  • Preserve License: Retain the Apache 2.0 license file in the original and derivative code.
The documentation part of this work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License . You may freely share, including copying and distributing this work in any medium or format, and freely adapt, remix, transform, and build upon the material. However, you are required to:
  • Attribution: Give appropriate credit, provide a link to the license, and indicate if changes were made.
  • NonCommercial: You may not use the material for commercial purposes. For commercial use, please contact the author.
  • ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.