You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/nw-ipfailover-configuration.adoc
+57-31Lines changed: 57 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -6,30 +6,31 @@
6
6
[id="nw-ipfailover-configuration_{context}"]
7
7
= Configuring IP failover in your cluster
8
8
9
-
As a cluster administrator, you can configure IP failover on an entire cluster, or on a subset of nodes, as defined by the label selector. You can also configure multiple IP failover deployment configurations in your cluster, where each one is independent of the others.
9
+
As a cluster administrator, you can configure IP failover on an entire cluster, or on a subset of nodes, as defined by the label selector. You can also configure multiple IP failover deployments in your cluster, where each one is independent of the others.
10
10
11
-
The IP failover deployment configuration ensures that a failover pod runs on each of the nodes matching the constraints or the label used.
11
+
The IP failover deployment ensures that a failover pod runs on each of the nodes matching the constraints or the label used.
12
12
13
13
This pod runs Keepalived, which can monitor an endpoint and use Virtual Router Redundancy Protocol (VRRP) to fail over the virtual IP (VIP) from one node to another if the first node cannot reach the service or endpoint.
14
14
15
15
For production use, set a `selector` that selects at least two nodes, and set `replicas` equal to the number of selected nodes.
16
16
17
17
.Prerequisites
18
18
19
-
* You are logged in to the cluster with a user with `cluster-admin` privileges.
19
+
* You are logged in to the cluster as a user with `cluster-admin` privileges.
20
20
* You created a pull secret.
21
+
* {rh-openstack-first} only:
22
+
** You installed an link:https://docs.openstack.org/python-openstackclient/latest/[{rh-openstack} client ({op-system} documentation)] on the target environment.
23
+
** You also downloaded the link:https://docs.openstack.org/zh_CN/user-guide/common/cli-set-environment-variables-using-openstack-rc.html[{rh-openstack} `openrc.sh` rc file ({op-system} documentation)].
21
24
22
25
.Procedure
23
26
24
-
//. Create an {product-title} pull secret
25
-
//+
26
27
. Create an IP failover service account:
27
28
+
28
29
[source,terminal]
29
30
----
30
31
$ oc create sa ipfailover
31
32
----
32
-
+
33
+
33
34
. Update security context constraints (SCC) for `hostNetwork`:
. {rh-openstack-first} only: Complete the following steps to make a failover VIP address reachable on {rh-openstack} ports.
47
+
+
48
+
.. Use the {rh-openstack} CLI to show the default {rh-openstack} API and VIP addresses in the `allowed_address_pairs` parameter of your {rh-openstack} cluster:
49
+
+
50
+
[source,terminal]
51
+
----
52
+
$ openstack port show <cluster_name> -c allowed_address_pairs
.. Set a different VIP address for the IP failover deployment and make the address reachable on {rh-openstack} ports by entering the following command in the {rh-openstack} CLI. Do not set any default {rh-openstack} API and VIP addresses as the failover VIP address for the IP failover deployment.
64
+
+
65
+
.Example of adding the `1.1.1.1` failover IP address as an allowed address on {rh-openstack} ports.
66
+
[source,terminal,subs="+attributes"]
67
+
----
68
+
$ openstack port set <cluster_name> --allowed-address ip-address=1.1.1.1,mac-address=fa:fa:16:3e:31:f9:cb
69
+
----
70
+
+
71
+
.. Create a deployment YAML file to configure IP failover for your deployment. See "Example deployment YAML for IP failover configuration" in a later step.
72
+
+
73
+
.. Specify the following specification in the IP failover deployment so that you pass the failover VIP address to the `OPENSHIFT_HA_VIRTUAL_IPS` environment variable:
74
+
+
75
+
.Example of adding the `1.1.1.1` VIP address to `OPENSHIFT_HA_VIRTUAL_IPS`
76
+
[source,yaml,subs="attributes,quotes"]
77
+
----
78
+
apiVersion: apps/v1
79
+
kind: Deployment
80
+
metadata:
81
+
name: ipfailover-keepalived
82
+
# ...
83
+
spec:
84
+
env:
85
+
- name: OPENSHIFT_HA_VIRTUAL_IPS
86
+
value: "1.1.1.1"
87
+
# ...
88
+
----
89
+
90
+
. Create a deployment YAML file to configure IP failover.
44
91
+
45
-
. Create a deployment YAML file to configure IP failover:
92
+
[NOTE]
93
+
====
94
+
For {rh-openstack-first}, you do not need to re-create the deployment YAML file. You already created this file as part of the earlier instructions.
95
+
====
46
96
+
47
97
.Example deployment YAML for IP failover configuration
48
98
[source,yaml]
@@ -159,27 +209,3 @@ spec:
159
209
<11> The strategy for handling a new higher priority host. The default value is `preempt_delay 300`, which causes a Keepalived instance to take over a VIP after 5 minutes if a lower-priority master is holding the VIP.
160
210
<12> The period, in seconds, that the check script is run. The default value is `2`.
161
211
<13> Create the pull secret before creating the deployment, otherwise you will get an error when creating the deployment.
162
-
////
163
-
+
164
-
.Example service YAML for IP failover configuration
0 commit comments