Fix Kops command to export k8s cluster config#310
Merged
Conversation
osterman
reviewed
Dec 11, 2018
| This is most likely caused by not setting the `kubectl` context to use the kops cluster. | ||
|
|
||
| To fix this, run `kubectl export kubecfg --name us-west-2.staging.cloudposse.org` (replace our kops cluster name with yours or use the `$KOPS_CLUSTER_NAME` variable, if set). =) | ||
| To fix this, run `kops export kubecfg --name us-west-2.staging.cloudposse.org` (replace our kops cluster name with yours or use the `$KOPS_CLUSTER_NAME` variable, if set). =) |
Member
There was a problem hiding this comment.
Suggested change
| To fix this, run `kops export kubecfg --name us-west-2.staging.cloudposse.org` (replace our kops cluster name with yours or use the `$KOPS_CLUSTER_NAME` variable, if set). =) | |
| To fix this, run `kops export kubecfg` (this assumes the`$KOPS_CLUSTER_NAME` variable is already set to the cluster name) |
osterman
reviewed
Dec 11, 2018
| e.g. | ||
| ``` | ||
| kubectl export kubecfg --name $KOPS_CLUSTER_NAME | ||
| kops export kubecfg --name $KOPS_CLUSTER_NAME |
Member
There was a problem hiding this comment.
Suggested change
| kops export kubecfg --name $KOPS_CLUSTER_NAME | |
| kops export kubecfg |
osterman
reviewed
Dec 11, 2018
| The kubernetes TLS keys are stored by `kops` in a private, encrypted S3 bucket. When using the geodesic shell, you'll need to export these credentials in order to access the kubernetes cluster using `kops` or `helm`. | ||
|
|
||
| This is done by running `kubectl export kubecfg $KOPS_CLUSTER_NAME` | ||
| This is done by running `kops export kubecfg --name $KOPS_CLUSTER_NAME` |
Member
There was a problem hiding this comment.
Suggested change
| This is done by running `kops export kubecfg --name $KOPS_CLUSTER_NAME` | |
| This is done by running `kops export kubecfg` |
osterman
reviewed
Dec 11, 2018
Member
osterman
left a comment
There was a problem hiding this comment.
Let's update to the current recommended syntax, rather than persist the old format. The --name $KOPS_CLUSTER_NAME argument is no longer necessary if KOPS_CLUSTER_NAME is set.
This should be `kops export`, `kubectl export` isn’t a thing. Also note that since newer versions of Kops will automatically look at the $KOPS_CLUSTER_NAME env var, we no longer need to explicitly pass it.
45e6e7d to
c19615f
Compare
Contributor
Author
|
@osterman comments addressed and rebased. |
osterman
approved these changes
Dec 13, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should be
kops export,kubectl exportisn’t a thing.