以下内容均来自个人笔记并重新梳理,如有错误欢迎指正!如果对您有帮助,烦请点赞、关注、订阅、转发!欢迎扫码关注个人公众号!
目录
写在前边
笔者在之前的文章中已经陆续介绍过 Kubernetes 的部分命令,本文将专题介绍 Kubernetes 的常用命令,处理日常工作基本够用了。
一、集群相关
1、查看集群信息
kubectl cluster-info
# 输出信息
Kubernetes master is running at https://172.17.xx.xx:6443
CoreDNS is running at https://172.17.xx.xx:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://172.17.xx.xx:6443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
2、查看集群服务
kubectl get apiservice
标签:kubectl,K8s,查看,Kubernetes,0%,io,常用命令,k8s,True
From: https://blog.csdn.net/2401_82795112/article/details/140800088