Commit b772c199 by tingweiwang

fix bug

1 parent 34145b56
Showing with 4 additions and 6 deletions
......@@ -416,7 +416,6 @@ kubectl config set-context default \
kubectl config use-context default --kubeconfig=kube-proxy.kubeconfig
ansible master -m copy -a "src=/root/k8s/script/k8s/kube-proxy.kubeconfig dest=/opt/kubernetes/cfg/"
ansible master -m shell -a "service kubelet restart"
#rm -rf bootstrap.kubeconfig kube-proxy.kubeconfig
sleep 5
kubectl get csr
kubectl get csr|grep 'Pending' | awk 'NR>0{print $1}'| xargs kubectl certificate approve
......@@ -468,11 +467,8 @@ echo "alias k='kubectl -n autodl'" >> ~/.bashrc
echo "alias kp='kubectl -n kpl'" >> ~/.bashrc
sleep 5
##############################################################################
echo "请手动在master节点 设置命令自动补全,命令在脚本最后一行注释"
#source <(kubectl completion bash) && echo "source <(kubectl completion bash)" >> ~/.bashrc"
##############################################################################
test=`lspci |grep -i vga |wc -l >/dev/null`
if [ $test -gt 1 ];then
test=`lspci |grep -i nvidia |wc -l`
if [ $test -gt 0 ];then
echo "为gpu节点打lable" && sleep 1
kubectl label node $host_name autodl=true kpl=true gpu=true cpu=true user_job_node=true internal_service_node=true
else
......@@ -492,3 +488,5 @@ kubectl apply -f /tmp/autodl_kpl_base/autodl-nfs
kubectl apply -f /tmp/autodl_kpl_base/kpl-nfs
echo "创建autodl push 镜像所需secret证书,用于configmap"
sh /root/k8s/autodl_kpl_base/create-harbor-secret.sh
##############################################################################
echo '粘贴下面命令手动设置kubectl命令自动补全,source <(kubectl completion bash) && echo "source <(kubectl completion bash)" >> ~/.bashrc' && sleep 2
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!