mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-30 15:02:23 +00:00
Merge pull request #67125 from isaacdong/patch-1
Automatic merge from submit-queue (batch tested with PRs 66602, 67178, 67207, 67125, 66332). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix get-kube-local.sh 2 wrong parameters. **bug fix** 1. run ./get-kube-local.sh, and get this error. > ./get-kube-local.sh: line 60: 2: unbound variable 2. remove duplicate filename in docker run command: `--kubeconfig=${KUBELET_KUBECONFIG}` **Special notes for your reviewer**: code detail: line 88: create-kubelet-kubeconfig "${KUBELET_KUBECONFIG}" line 59: function create-kubelet-kubeconfig() { line 60: local destination="${1}" **Release note**: ```release-note NONE ```
This commit is contained in:
commit
1b4f2e1f4e
@ -55,8 +55,9 @@ function run {
|
||||
}
|
||||
|
||||
# Creates a kubeconfig file for the kubelet.
|
||||
# Args: destination file path
|
||||
# Args: the IP address of the API server (e.g. "http://localhost:8080"), destination file path
|
||||
function create-kubelet-kubeconfig() {
|
||||
#local api_addr="${1}"
|
||||
local destination="${2}"
|
||||
if [[ -z "${destination}" ]]; then
|
||||
echo "Must provide destination path to create Kubelet kubeconfig file!"
|
||||
@ -85,7 +86,7 @@ EOF
|
||||
function create_cluster {
|
||||
echo "Creating a local cluster:"
|
||||
echo -e -n "\tStarting kubelet..."
|
||||
create-kubelet-kubeconfig "${KUBELET_KUBECONFIG}"
|
||||
create-kubelet-kubeconfig "http://localhost:8080" "${KUBELET_KUBECONFIG}"
|
||||
run "docker run \
|
||||
--volume=/:/rootfs:ro \
|
||||
--volume=/sys:/sys:ro \
|
||||
@ -103,7 +104,7 @@ function create_cluster {
|
||||
--containerized \
|
||||
--hostname-override="127.0.0.1" \
|
||||
--address="0.0.0.0" \
|
||||
--kubeconfig=${KUBELET_KUBECONFIG}/kubelet.kubeconfig \
|
||||
--kubeconfig=${KUBELET_KUBECONFIG} \
|
||||
--pod-manifest-path=/etc/kubernetes/manifests \
|
||||
--allow-privileged=true \
|
||||
--cluster-dns=10.0.0.10 \
|
||||
|
Loading…
Reference in New Issue
Block a user