-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add K8S controller #22
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with some suggestions
@@ -0,0 +1,81 @@ | |||
JAAS: Add a K8S cloud to JIMM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A suggestion, how different is it adding a generic cloud versus a k8s cloud? Could we make this a guide for adding any kind of cloud and then include a ::note section example here, on what tweaks to make for a k8s cloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this should remain a very specific how-to.. other than k8s, i think users would only ever want to add maas as a cloud.. and that could be another tutorial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhmmm, idk here, happy to do whatever you guys conclude on
how-to/add_k8s_cloud.rst
Outdated
- Have JIMM deployed with admin access | ||
- Have a machine based controller added to JIMM | ||
- Basic knowledge of K8S | ||
- A controller running in the region next to your K8S deployment, whether that be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is confusing, in the region next to your k8s deployment
. What does "next to" mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok I meant same subnet or a subnet with specific routing rules to another subnet, I'll update to be clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
how-to/add_k8s_cloud.rst
Outdated
|
||
``cat ~/.kube/config`` | ||
|
||
In this `contexts` object, locate your designed context and remember |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
designed -> desired?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or "designated"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although.. to be fair.. we never tell users how to organize their .kube/config file.. they might not have multiple contexts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is typical to have them in one config file as k8s doesnt support config file aggregation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on desired, changed @kian99
|
||
Next we'll add the cloud by context to JIMM. | ||
|
||
Firstly let us switch to the JIMM controller (note, this is not the controller JIMM is running on but JIMM itself), run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then maybe we should just say "switch to JIMM", keeping the bits in brackets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit lost with this, what do you mean?
how-to/add_k8s_cloud.rst
Outdated
|
||
JIMM will now take these credentials, and add them to the controller within that cloud and region. | ||
|
||
You can check if the credential have been uploaded to the controller managed by JIMM via: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have -> has
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit confusing.. you're saying "if the credenital(s) have been uploaded" and in the next step you're telling users they need to update credentials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sorry, it should say "cloud" not credential, updated
how-to/add_k8s_cloud.rst
Outdated
As you're an admin, no access grants are required: | ||
``juju add-credential <your k8s cloud name>`` | ||
|
||
This will take you through an interactive input terminal, typically all fields can be skipped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to know what the other fields are for though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
how-to/add_k8s_cloud.rst
Outdated
|
||
This will take you through an interactive input terminal, typically all fields can be skipped | ||
except one. When asked for what auth type you wish to use, select OAuth2.0 and retrieve your | ||
access token and user for your cluster from `~/.kube/config`, this is located in the user section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can users authenticate with a k8s cluster via username/password auth? Or other auth besides OAuth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup they can! updated to include
@@ -0,0 +1,81 @@ | |||
JAAS: Add a K8S cloud to JIMM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this should remain a very specific how-to.. other than k8s, i think users would only ever want to add maas as a cloud.. and that could be another tutorial
how-to/add_k8s_cloud.rst
Outdated
|
||
Introduction | ||
------------ | ||
In this how-to, we will demonstrate adding a K8S cloud to JIMM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick.. we are not "demonstrating" we are showing users how to do it..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
how-to/add_k8s_cloud.rst
Outdated
|
||
``cat ~/.kube/config`` | ||
|
||
In this `contexts` object, locate your designed context and remember |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or "designated"
how-to/add_k8s_cloud.rst
Outdated
|
||
``cat ~/.kube/config`` | ||
|
||
In this `contexts` object, locate your designed context and remember |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although.. to be fair.. we never tell users how to organize their .kube/config file.. they might not have multiple contexts
how-to/add_k8s_cloud.rst
Outdated
Add your K8S cloud using the following command: | ||
``juju add-k8s --context-name <context field from ~/.kube/config> --cloud=<cloud name> --region=<region name> <your k8s cloud name>`` | ||
|
||
Presuming you are running on EKS, your command may look like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
presuming your context name is "operatorinc" and the eks cluster is running in eu-west-2..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
how-to/add_k8s_cloud.rst
Outdated
|
||
JIMM will now take these credentials, and add them to the controller within that cloud and region. | ||
|
||
You can check if the credential have been uploaded to the controller managed by JIMM via: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit confusing.. you're saying "if the credenital(s) have been uploaded" and in the next step you're telling users they need to update credentials.
On your JIMM instance where you are the administrator, run: | ||
``juju grant-cloud <username> add-model <your k8s cloud name>`` | ||
|
||
Lastly, request the user runs the following on the JIMM controller: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm.. should we show them how to create users in k8s.. i don't think we would want to advise them to share the same credential with all users that should have access to the new cloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be really complicated as there's many ways to do it ... I feel this was more a "quick and dirty" how-to
A simple tutorial on adding k8s cloud to JIMM.