Add page about kube-context handling in docs concepts section#2992
Conversation
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Codecov Report
|
|
cc @balopat as you raised this in #2510 (review) |
|
Please visit http://35.236.111.216:1313 to view changes to the docs. |
|
|
||
| When interacting with a kubernetes cluster, Skaffold does so via a kube-context. | ||
| Thus, the selected kube-context determines the kubernetes cluster, the kubernetes user, and the default namespace. | ||
| By default, Skaffold uses the _current_ kube-context from your kube-config file. |
There was a problem hiding this comment.
| By default, Skaffold uses the _current_ kube-context from your kube-config file. | |
| By default, Skaffold uses the _current_ kube-context from your kube-config file at `~/.kube/config` |
There was a problem hiding this comment.
I also thought about including this, but Skaffold also respects the KUBECONFIG env var. So the location you suggest isn't always correct. I'm fine either way, but please just confirm that you really want the path there.
There was a problem hiding this comment.
I think we should leave the path out, since this file doesn't necessarily have to live anywhere.
|
|
||
| To override this default, Skaffold offers two options: | ||
|
|
||
| 1. Via the `kube-context` flag |
There was a problem hiding this comment.
| 1. Via the `kube-context` flag | |
| 1. `kube-context` flag |
| - kubeContext: minikube | ||
| ``` | ||
|
|
||
| It is illegal to activate both profiles which happens when |
There was a problem hiding this comment.
you could re-word this as
| It is illegal to activate both profiles which happens when | |
| Activating multiple `kube-contexts` will result in error. |
You could also mention the error we print here.
There was a problem hiding this comment.
That wording sounds as if it is illegal to have multiple differing profiles.deploy.kubeContext configurations. However that is not the case.
What I am trying to say is that it is illegal to have automatic profile activations via a matching kube-context AND the effective kube-context changes.
I'll try to make that point clearer.
|
|
||
| ### Kube-context activation and Skaffold profiles | ||
|
|
||
| The kube-context has a double role for Skaffold profiles: |
There was a problem hiding this comment.
This is a little bit confusing.
You could say,
| The kube-context has a double role for Skaffold profiles: | |
| Multiple `kube-contexts` can be activated from skaffold profiles. |
There was a problem hiding this comment.
A put some thoughts into this, if I can make this whole part clearer. Can you have another look?
There was a problem hiding this comment.
I think this makes sense. the main point here is that the kube-context has two semantic roles in the activation of skaffold profiles, but not that multiple contexts can be activated from profiles (since that's not really true).
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
|
Hey @tejal29, thanks for doing such a thorough check of this docs change. I tried to improve the readability and logic flow. Can you take another look? |
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
|
That CI failure seems unrelated. |
nkubala
left a comment
There was a problem hiding this comment.
LGTM, thanks for clarifying this @corneliusweig
Relates to #2510 and #2447
Also see https://github.com/GoogleContainerTools/skaffold/blob/master/docs/design_proposals/configurable-kubecontext.md
Description
This PR adds a page to the concepts section in the docs about the kube-context activation. The PR also addresses a comment from #2510 (review).
User facing changes
n/a
Before
n/a
After
n/a
Next PRs.
n/a
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Reviewer Notes