#95 document --kubeconfig-contexts option

This commit is contained in:
Henning Jacobs
2017-01-15 18:22:03 +01:00
parent 580b042d33
commit aa91b944aa

View File

@@ -26,9 +26,9 @@ Assuming ``~/.kube/config`` as the following contents with two defined contexts:
name: kube_bar_example_org name: kube_bar_example_org
contexts: contexts:
- context: {cluster: kube_foo_example_org, user: kube_foo_example_org} - context: {cluster: kube_foo_example_org, user: kube_foo_example_org}
name: kube_foo_example_org name: foo
- context: {cluster: kube_bar_example_org, user: kube_bar_example_org} - context: {cluster: kube_bar_example_org, user: kube_bar_example_org}
name: kube_bar_example_org name: bar
current-context: kube_foo_example_org current-context: kube_foo_example_org
users: users:
- name: kube_foo_example_org - name: kube_foo_example_org
@@ -43,6 +43,14 @@ Kubernetes Operational View would try to reach both endpoints with the respectiv
$ # note that we need to mount the local ~/.kube/config file into the Docker container $ # note that we need to mount the local ~/.kube/config file into the Docker container
$ docker run -it -p 8080:8080 -v ~/.kube/config:/kubeconfig hjacobs/kube-ops-view --kubeconfig-path=/kubeconfig $ docker run -it -p 8080:8080 -v ~/.kube/config:/kubeconfig hjacobs/kube-ops-view --kubeconfig-path=/kubeconfig
You can select which clusters should be queried by specifying a list of kubeconfig contexts with the ``--kubeconfig-contexts`` option:
.. code-block:: bash
$ docker run -it -p 8080:8080 -v ~/.kube/config:/kubeconfig hjacobs/kube-ops-view --kubeconfig-path=/kubeconfig --kubeconfig-contexts=bar
This would only query the Kubernetes cluster defined by the ``bar`` context.
Cluster Registry Cluster Registry
================ ================