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
23f2401b
Commit
23f2401b
authored
Apr 16, 2015
by
Robert Bailey
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6961 from GoogleCloudPlatform/revert-6954-fix-kubeconfig
Revert "Move KUBECONFIG into common.sh, change default to new location"
parents
508318af
723f2941
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
common.sh
cluster/common.sh
+0
-5
util.sh
cluster/gce/util.sh
+1
-0
No files found.
cluster/common.sh
View file @
23f2401b
...
...
@@ -22,8 +22,6 @@ set -o pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
DEFAULT_KUBECONFIG
=
"
${
HOME
}
/.kube/config"
# Generate kubeconfig data for the created cluster.
# Assumed vars:
# KUBE_USER
...
...
@@ -38,7 +36,6 @@ DEFAULT_KUBECONFIG="${HOME}/.kube/config"
function
create-kubeconfig
()
{
local
kubectl
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
KUBECONFIG
=
${
KUBECONFIG
:-
$DEFAULT_KUBECONFIG
}
# KUBECONFIG determines the file we write to, but it may not exist yet
if
[[
!
-e
"
${
KUBECONFIG
}
"
]]
;
then
mkdir
-p
$(
dirname
"
${
KUBECONFIG
}
"
)
...
...
@@ -63,7 +60,6 @@ function create-kubeconfig() {
# KUBECONFIG
# CONTEXT
function
clear-kubeconfig
()
{
KUBECONFIG
=
${
KUBECONFIG
:-
$DEFAULT_KUBECONFIG
}
local
kubectl
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
"
${
kubectl
}
"
config
unset
"clusters.
${
CONTEXT
}
"
"
${
kubectl
}
"
config
unset
"users.
${
CONTEXT
}
"
...
...
@@ -89,7 +85,6 @@ function clear-kubeconfig() {
# KUBE_USER,KUBE_PASSWORD will be empty if no current-context is set, or
# the current-context user does not exist or contain basicauth entries.
function
get-kubeconfig-basicauth
()
{
KUBECONFIG
=
${
KUBECONFIG
:-
$DEFAULT_KUBECONFIG
}
# Templates to safely extract the username,password for the current-context
# user. The long chain of 'with' commands avoids indexing nil if any of the
# entries ("current-context", "contexts"."current-context", "users", etc)
...
...
cluster/gce/util.sh
View file @
23f2401b
...
...
@@ -673,6 +673,7 @@ function kube-up {
echo
"Kubernetes cluster created."
# TODO use token instead of basic auth
export
KUBECONFIG
=
"
${
HOME
}
/.kube/.kubeconfig"
export
KUBE_CERT
=
"/tmp/kubecfg.crt"
export
KUBE_KEY
=
"/tmp/kubecfg.key"
export
CA_CERT
=
"/tmp/kubernetes.ca.crt"
...
...
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