Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
k8s
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b772c199
authored
Aug 29, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
1 parent
34145b56
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
script/k8s/deploy-gpu-k8s.sh
script/k8s/deploy-gpu-k8s.sh
View file @
b772c19
...
...
@@ -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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment