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
308155d1
Commit
308155d1
authored
Sep 17, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14038 from Huawei-PaaS/fixed_some_typos_in_sharing_clusters_md
Auto commit by PR queue bot
parents
650e38e1
fbaf7d8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
sharing-clusters.md
docs/user-guide/sharing-clusters.md
+10
-10
No files found.
docs/user-guide/sharing-clusters.md
View file @
308155d1
...
...
@@ -34,7 +34,7 @@ Documentation for other releases can be found at
# Sharing Cluster Access
Client access to a running Kubernetes cluster can be shared by copying
the
`kubectl`
client config bundle (
[
.
kubeconfig
](
kubeconfig-file.md
)
).
the
`kubectl`
client config bundle (
[
kubeconfig
](
kubeconfig-file.md
)
).
This config bundle lives in
`$HOME/.kube/config`
, and is generated
by
`cluster/kube-up.sh`
. Sample steps for sharing
`kubeconfig`
below.
...
...
@@ -64,7 +64,7 @@ $ mv /path/to/.kube/config $HOME/.kube/config
$
mv
/path/to/.kube/config
$PWD
```
*
Option C: manually pass
`kubeconfig`
location to
`
.
kubectl`
*
Option C: manually pass
`kubeconfig`
location to
`kubectl`
```
console
#
via environment variable
...
...
@@ -99,7 +99,7 @@ $ kubectl config set-credentials $USER_NICK \
--client-certificate
=
/path/to/crt_file
\
--client-key
=
/path/to/key_file
\
--embed-certs
=
true
\
--kubeconfig
=
/path/to/standalone/.kubeconfig
--kubeconfig
=
/path/to/standalone/.kube
/
config
#
create context entry
$
kubectl config set-context
$CONTEXT_NAME
--cluster
=
$CLUSTER_NICKNAME
--user
=
$USER_NICK
...
...
@@ -127,9 +127,9 @@ and/or run `kubectl config -h`.
`kubectl`
loads and merges config from the following locations (in order)
1.
`--kubeconfig=
path/to/.kube/config`
command
line flag
2.
`KUBECONFIG=path/to/.kube/config`
env variable
3.
`$PWD/.kubeconfig`
1.
`--kubeconfig=
/path/to/.kube/config`
command
line flag
2.
`KUBECONFIG=
/
path/to/.kube/config`
env variable
3.
`$PWD/.kube
/
config`
4.
`$HOME/.kube/config`
If you create clusters A, B on host1, and clusters C, D on host2, you can
...
...
@@ -137,14 +137,14 @@ make all four clusters available on both hosts by running
```
console
#
on host2, copy host1
's default kubeconfig, and merge it from env
$
scp host1:/path/to/home1/.kube/config path/to/other/.kube/config
$
scp host1:/path/to/home1/.kube/config
/
path/to/other/.kube/config
$
export
$KUBECONFIG
=
path/to/other/.kube/config
$
export
$KUBECONFIG
=
/
path/to/other/.kube/config
#
on host1, copy host2
's default kubeconfig and merge it from env
$
scp host2:/path/to/home2/.kube/config path/to/other/.kube/config
$
scp host2:/path/to/home2/.kube/config
/
path/to/other/.kube/config
$
export
$KUBECONFIG
=
path/to/other/.kube/config
$
export
$KUBECONFIG
=
/
path/to/other/.kube/config
```
Detailed examples and explanation of
`kubeconfig`
loading/merging rules can be found in
[
kubeconfig-file.md
](
kubeconfig-file.md
)
.
...
...
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