Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added info about using merged-kubeconfig for joining the cluster. #209

Merged
merged 2 commits into from
Mar 5, 2020

Conversation

aswinsuryan
Copy link
Contributor

@aswinsuryan aswinsuryan commented Feb 26, 2020

Signed-off-by: Aswin Surayanarayanan [email protected]

Fixes: #210

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr209/aswinsuryan/create-kubeconfig

* Deploy Broker with Dataplane - To deploy the Submariner broker along with the data cluster, run using the broker-info.subm generated in the folder from which the previous step was run.
```
subctl deploy-broker --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
subctl deploy-broker --kubecontext <BROKER-CONTEXT-NAME> --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this step require a non-merged configuration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, else it is failing.

* Deploy Broker with Dataplane - To deploy the Submariner broker along with the data cluster, run using the broker-info.subm generated in the folder from which the previous step was run.
```
subctl deploy-broker --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
subctl deploy-broker --kubecontext <BROKER-CONTEXT-NAME> --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a warning to highlight that due to a bug deploy-broker requires unmerged kubeconfg and should use workaround of using unmerged config.

⚠️ Due to a bug deploy-broker fails if using merged kubeconfig. Use unmerged broker kubeconfig as a workaround while issue is being fixed.

Add link to issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think since it is due to Kubefed and removal of kubefed will fix this, it would be ok right if we don't mention an explicit warning. May be general warning in the initial section should be fine.

@submariner-bot
Copy link
Contributor

🤖 Updated branch: z_pr209/aswinsuryan/create-kubeconfig

@skitt skitt added this to the v0.1.1 milestone Mar 3, 2020
@skitt
Copy link
Member

skitt commented Mar 3, 2020

This will also need to be cherry-picked to the 0.1 branch.

README.md Outdated
@@ -66,15 +66,20 @@ The [Lighthouse](https://github.com/submariner-io/lighthouse) project helps in c

To deploy Submariner with Lighthouse follow the below steps.

* Create a kubeconfig file which has the context of all the clusters. If KUBECONFIG environment variable set with the path to all clusters, you could use the below command.
```
kubectl config view --flatten > kubeconfig_merged

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After creating "kubeconfig_merged", where should it be used ?
Please specify command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the details in the join command, where this should be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added more details on the README based on your feedback.

* Deploy Broker with Dataplane - To deploy the Submariner broker along with the data cluster, run using the broker-info.subm generated in the folder from which the previous step was run.
```
subctl deploy-broker --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
subctl deploy-broker --kubecontext <BROKER-CONTEXT-NAME> --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before calling deploy command, what if the current kubeconfig (already exported) is pointing to one of the clusters, which is not the broker cluster ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--kubecontext overides the current-cluster selection.

@submariner-bot
Copy link
Contributor

🤖 Updated branch: z_pr209/aswinsuryan/create-kubeconfig

@submariner-bot
Copy link
Contributor

🤖 Updated branch: z_pr209/aswinsuryan/create-kubeconfig

@submariner-bot
Copy link
Contributor

🤖 Updated branch: z_pr209/aswinsuryan/create-kubeconfig

Copy link
Contributor

@mangelajo mangelajo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work for openshift configs, we need a solution for that before we call this closed.

```
subctl deploy-broker --kubeconfig <PATH-TO-KUBECONFIG-BROKER> --dataplane --service-discovery --broker-cluster-context <BROKER-CONTEXT-NAME> --clusterid <CLUSTER-ID-FOR-TUNNELS>
kubectl config view --flatten > merged_kubeconfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this does not work for openshift configs, all clusters will have context "admin".

We need a solution for that as part of #210

@mangelajo
Copy link
Contributor

@aswinsuryan @skitt @vthapar see this for reference: https://www.youtube.com/watch?v=zuh3JFtNbeU

Probabably we can include that step as part of an openshift with discovery quickstart

@submariner-bot
Copy link
Contributor

🤖 Updated branch: z_pr209/aswinsuryan/create-kubeconfig

kubectl config view --flatten > merged_kubeconfig
```

Note, if you are using Openshift configs and if it has the default name for users (admin), merging the files will create a conflict. So you can change the name to a meaningful name before running the above command using,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mangelajo
Copy link
Contributor

This will also need to be cherry-picked to the 0.1 branch.

Technically I think we don't need to do that since we are not publishing separate docs. I think we may want to move all this to the website instead when we are comfortable about it.

@mangelajo mangelajo merged commit cf580e1 into submariner-io:master Mar 5, 2020
@submariner-bot
Copy link
Contributor

🤖 Updated branch: z_pr209/aswinsuryan/create-kubeconfig

@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr209/aswinsuryan/create-kubeconfig]

@skitt
Copy link
Member

skitt commented Mar 5, 2020

This will also need to be cherry-picked to the 0.1 branch.

Technically I think we don't need to do that since we are not publishing separate docs. I think we may want to move all this to the website instead when we are comfortable about it.

Even if we don’t publish branched docs anywhere, it’s nice to provide the most relevant docs in the source tarballs from the releases page ;-).

@skitt
Copy link
Member

skitt commented Mar 5, 2020

Cherry-picked in #233.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the use of merged kubeconfigs
6 participants