三亩地 三亩地SAN MU DI · CODE DIARY
ARTICLE DETAIL

日记详情

真实记录编程学习的某一天,欢迎挑你感兴趣的翻一翻。

【Kubernetes】kubectl常用命令总结

【Kubernetes】kubectl常用命令总结
[ 查看k8s集群版本信息 ] # kubectl version [ 查看nodes ] # kubectl get nodes NAME STATUS ROLES AGE VERSION k8s-master Ready control-plane 2y100d v1.24.10 k8s-node01 Ready <none> 2y100d v1.24.10 k8s-node02 Ready <none> 2y100d v1.24.10 [ 查看集群信息 ] # kubectl cluster-info Kubernetes control plane is running at https://192.168.223.201:6443 CoreDNS is running at https://192.168.223.201:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. [ 创建命名空间slb ] # kubectl create namespace slb namespace/slb created [ 在指定的命名空间下,使用1.30.4版本的nginx镜像,创建一个deployment,名称为web ] # kubectl create deployment web --image=
← 返回列表