-
Notifications
You must be signed in to change notification settings - Fork 45
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
Make Control Plane Ingress IP configurable #3415
Changes from all commits
824e616
f86cb04
d410b52
c6efd5a
967099a
a5b85dd
4fe7cac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,14 @@ and can be used for operating, extending and upgrading a MetalK8s cluster. | |
|
||
Gather Required Information | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Get the control plane IP of the bootstrap node. | ||
Get the ingress control plane IP. | ||
|
||
.. code-block:: shell | ||
.. code-block:: console | ||
|
||
root@bootstrap $ salt-call grains.get metalk8s:control_plane_ip | ||
local: | ||
<the control plane IP> | ||
root@bootstrap $ kubectl --kubeconfig=/etc/kubernetes/admin.conf \ | ||
get svc -n metalk8s-ingress ingress-nginx-control-plane-controller \ | ||
-o=jsonpath='{.spec.externalIPs[0]}{"\n"}' | ||
<the ingress control plane IP> | ||
Comment on lines
+19
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😢 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's just to check that it's the IP we want, you do not like it ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of our commands are getting super verbose (same for running a command in the salt-master)... Not saying it's wrong 😉, just that it'd be nice if we could wrap those calls in some There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yess I agree |
||
|
||
Use MetalK8s UI | ||
^^^^^^^^^^^^^^^ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Changing the Control Plane Ingress IP | ||
===================================== | ||
|
||
#. On the Bootstrap node, update the ``ip`` field from | ||
``networks.controlPlane.ingress`` in the Bootstrap configuration file. | ||
(refer to :ref:`Bootstrap Configuration<Bootstrap Configuration>`) | ||
|
||
#. Refresh the pillar. | ||
|
||
.. code-block:: console | ||
|
||
$ salt-call saltutil.refresh_pillar wait=True | ||
|
||
#. Check that the change is taken into account. | ||
|
||
.. code-block:: console | ||
|
||
$ salt-call metalk8s_network.get_control_plane_ingress_ip | ||
local: | ||
<my-new-ip> | ||
|
||
#. On the Bootstrap node, reconfigure apiServer: | ||
|
||
.. parsed-literal:: | ||
|
||
$ salt-call state.sls \\ | ||
metalk8s.kubernetes.apiserver \\ | ||
saltenv=metalk8s-|version| | ||
|
||
#. Reconfigure Control Plane components: | ||
|
||
.. parsed-literal:: | ||
|
||
$ kubectl exec -n kube-system -c salt-master \\ | ||
--kubeconfig=/etc/kubernetes/admin.conf \\ | ||
$(kubectl --kubeconfig=/etc/kubernetes/admin.conf get pod \\ | ||
-l "app.kubernetes.io/name=salt-master" \\ | ||
--namespace=kube-system -o jsonpath='{.items[0].metadata.name}') \\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm right I could use it 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haha good point 👌 We'll have to make these commands simpler anyway, so if we change how we deploy things, we don't have to update it in hundreds of places across our docs. |
||
-- salt-run state.orchestrate \\ | ||
metalk8s.orchestrate.update-control-plane-ingress-ip \\ | ||
saltenv=metalk8s-|version| | ||
|
||
#. You can :ref:`access the MetalK8s GUI <installation-services-admin-ui>` | ||
using this new IP. |
This file was deleted.
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.
...through the Ingress controller. But some components also listen on host ports directly, no? Especially K8s API, which is useful to access in case of Bootstrap issues.
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.
Right, but if you lose bootstrap you do not have access to OIDC so access to Kubernetes APIServer (should) do not work as well (if we generated kubeconfig specific to each user 😉)
But agree, I will replace "control plane component" with
OIDC and various Control Plane UIs