k8s常用命令

1、编辑ingress

kubectl edit ingress

2、查看ingress

kubectl get ing
#详情
kubectl get ing -o yaml
#更新
kubectl get ing test

3、进入pod内部

kubectl exec -it podname /bin/bash

4、查看pod

kubectl get pod
#pod的详细信息(在哪个节点)
kubectl get pod [-n xx(空间名)]-o wide
#pod的详细信息
kubectl describe pod pod name
#通过选择器名查询
kubectl get pod --selector name=redis

5、查看日志

//法一
kubectl logs -f --tail=500 podname
//法二
kubectl -n xx(空间名) logs -f podname

6、进入容器内部

//法一
kubectl exec podname -it /bin/bash
//法二
kubectl -n xx(空间名) exec -it podname sh

7、查看sha256

#法一
kubectl describe pod podname
#法二
docker images --digests | grep 镜像名
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值