Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
544e7aae
Commit
544e7aae
authored
Feb 06, 2017
by
xilabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to set local kubeconfig and update the prompt
parent
821e1712
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
local-up-cluster.sh
hack/local-up-cluster.sh
+14
-9
No files found.
hack/local-up-cluster.sh
View file @
544e7aae
...
...
@@ -450,16 +450,16 @@ function start_apiserver {
kube::util::write_client_kubeconfig
"
${
CONTROLPLANE_SUDO
}
"
"
${
CERT_DIR
}
"
"
${
ROOT_CA_FILE
}
"
"
${
API_HOST
}
"
"
${
API_SECURE_PORT
}
"
controller
kube::util::write_client_kubeconfig
"
${
CONTROLPLANE_SUDO
}
"
"
${
CERT_DIR
}
"
"
${
ROOT_CA_FILE
}
"
"
${
API_HOST
}
"
"
${
API_SECURE_PORT
}
"
scheduler
if
[[
-z
"
${
AUTH_ARGS
}
"
]]
;
then
if
[[
"
${
ALLOW_ANY_TOKEN
}
"
=
true
]]
;
then
if
[[
-z
"
${
AUTH_ARGS
}
"
]]
;
then
if
[[
"
${
ALLOW_ANY_TOKEN
}
"
=
true
]]
;
then
# use token authentication
if
[[
-n
"
${
KUBECONFIG_TOKEN
}
"
]]
;
then
if
[[
-n
"
${
KUBECONFIG_TOKEN
}
"
]]
;
then
AUTH_ARGS
=
"--token=
${
KUBECONFIG_TOKEN
}
"
else
AUTH_ARGS
=
"--token=system:admin/system:masters"
fi
else
# default to
use certificate authentication
# default to
the admin client cert/key
AUTH_ARGS
=
"--client-key=
${
CERT_DIR
}
/client-admin.key --client-certificate=
${
CERT_DIR
}
/client-admin.crt"
fi
fi
...
...
@@ -688,7 +688,12 @@ fi
if
[[
"
${
START_MODE
}
"
!=
"kubeletonly"
]]
;
then
echo
cat
<<
EOF
To start using your cluster, open up another terminal/tab and run:
To start using your cluster, you can open up another terminal/tab and run:
export KUBECONFIG=
${
CERT_DIR
}
/admin.kubeconfig
cluster/kubectl.sh
Alternatively, you can write to the default kubeconfig:
export KUBERNETES_PROVIDER=local
...
...
@@ -728,13 +733,13 @@ kube::util::test_cfssl_installed
### IF the user didn't supply an output/ for the build... Then we detect.
if
[
"
$GO_OUT
"
==
""
]
;
then
detect_binary
detect_binary
fi
echo
"Detected host and ready to start services. Doing some housekeeping first..."
echo
"Using GO_OUT
$GO_OUT
"
KUBELET_CIDFILE
=
/tmp/kubelet.cid
if
[[
"
${
ENABLE_DAEMON
}
"
=
false
]]
;
then
trap
cleanup EXIT
trap
cleanup EXIT
fi
echo
"Starting services now!"
...
...
@@ -765,13 +770,13 @@ if [[ "${START_MODE}" != "nokubelet" ]]; then
fi
if
[[
-n
"
${
PSP_ADMISSION
}
"
&&
"
${
ENABLE_RBAC
}
"
=
true
]]
;
then
create_psp_policy
create_psp_policy
fi
print_success
if
[[
"
${
ENABLE_DAEMON
}
"
=
false
]]
;
then
while
true
;
do
sleep
1
;
done
while
true
;
do
sleep
1
;
done
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment