tianyun 8 月之前
父节点
当前提交
ae81c0d62c
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      sh_config.sh

+ 5 - 5
sh_config.sh

@@ -50,11 +50,11 @@ function k8s-get-default-namespace() {
 	kubectl config view | grep namespace
 }
 function k8s-set-default-namespace() {
-	k8s-getnamespace
+	k8s-get-all-namespace
 	kubectl config set-context --current --namespace="$1"
 }
 function k8s-getpod() {
-	k8s-getnamespace
+	k8s-get-all-namespace
 	# 如果有参数,则过滤
 	if [ ! -z "$1" ]; then
 		kubectl get pods -o wide | grep "$1"
@@ -64,18 +64,18 @@ function k8s-getpod() {
 }
 alias k8s-descpods='kubectl describe pods'
 function k8s-getlog() {
-	k8s-getnamespace
+	k8s-get-all-namespace
 	podName=$(kubectl get pods -o wide | grep "${1}" | awk '{print $1}')
 	kubectl logs --tail=300 -f "${podName}"
 }
 function k8s-getlogbase() {
-	k8s-getnamespace
+	k8s-get-all-namespace
 	podName=$(kubectl get pods -o wide | grep "${1}" | awk '{print $1}')
 	kubectl logs -c base-jre --tail=300 -f "${podName}"
 }
 alias k8s-delpod='kubectl delete pod ${1} --force'
 function k8s-inpod() {
-	k8s-getnamespace
+	k8s-get-all-namespace
 	podName=$(kubectl get pods -o wide | grep "${1}" | awk '{print $1}')
 	kubectl exec -it "${podName}" -- /bin/bash
 }