Skip to content

Commit 095310e

Browse files
authored
SKUPPER-2883: High availability (#281)
ha explanation
1 parent d1f0380 commit 095310e

4 files changed

Lines changed: 79 additions & 4 deletions

File tree

input/kube-cli/site-configuration.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,40 @@ For example
7676
To configure site resources, see [Setting site resources](../kube-yaml/site-configuration.html#kube-site-resources-yaml).
7777

7878

79+
<a id="kube-ha-cli"></a>
80+
## Creating a high availability site using the CLI on Kubernetes
81+
82+
You can create a site that is highly available by using the `ha` option.
83+
High availability mode is intended to maintain service continuity during router restarts or pod rescheduling, but it does not provide failover if network connectivity between sites is lost.
84+
High availability mode deploys two router pods with anti-affinity rules to ensure service continuity during node failures.
85+
86+
**Prerequisites**
87+
88+
* The `skupper` CLI is installed.
89+
* The Skupper controller is running on the Kubernetes cluster.
90+
91+
**Procedure**
92+
93+
1. Create a high availability site on Kubernetes:
94+
95+
```bash
96+
skupper site create <site-name> --enable-ha
97+
```
98+
If the site already exists, you can use the `update` command to enable high availability:
99+
```bash
100+
skupper site update --enable-ha
101+
```
102+
2. To verify that the site is running in high availability mode, run the following command:
103+
```bash
104+
kubectl get site -o yaml | grep ha
105+
```
106+
The output should be similar to the following:
107+
```
108+
ha: true
109+
```
110+
When high availability mode is enabled, two router pods are created so that traffic can continue if one pod restarts or is rescheduled.
111+
High availability can also help during a node failure.
112+
79113
<a id="kube-deleting-site-cli"></a>
80114
## Deleting a site using the CLI on Kubernetes
81115

input/kube-cli/site-linking.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,20 @@ To link sites, you create a `link` resource YAML file on one site and apply that
101101
skupper link generate > <filename>
102102
```
103103
where `<filename>` is the name of a YAML file that is saved on your local filesystem.
104+
The `link` YAML file contains the following information:
105+
* The name of the link
106+
* The certificate used to authenticate the link
107+
* Two host and port entries for the listening site are included for each link.
108+
109+
If the listening site uses high availability mode, two link resources are created.
104110

105-
3. Apply the `link` resource YAML file on a different site to create a link:
111+
1. Apply the `link` resource YAML file on a different site to create a link:
106112
```bash
107113
kubectl apply -f <filename>
108114
```
109115
where `<filename>` is the name of a YAML file that is saved on your local filesystem.
110116

111-
4. Check the status of the link:
117+
2. Check the status of the link:
112118
```bash
113119
skupper link status
114120
```
@@ -124,4 +130,3 @@ To link sites, you create a `link` resource YAML file on one site and apply that
124130
You can now expose services on the application network.
125131

126132
There are many options to consider when linking sites using the CLI, see [CLI Reference][cli-ref], including *frequently used* options.
127-

input/kube-yaml/site-configuration.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,42 @@ There are many options to consider when creating sites using YAML, see the [YAML
6868
[yaml-ref]: https://skupperproject.github.io/refdog/resources/index.html
6969

7070

71+
<a id="kube-ha-yaml"></a>
72+
## Creating a high availability site using YAML
73+
74+
You can create a site that is highly available by using the `ha` option.
75+
High availability mode is intended to maintain service continuity during router restarts or pod rescheduling, but it does not provide failover if network connectivity between sites is lost.
76+
High availability mode deploys two router pods with anti-affinity rules to ensure service continuity during node failures.
77+
78+
**Prerequisites**
79+
80+
* The Skupper controller is running on the Kubernetes cluster you are running
81+
82+
83+
Procedure
84+
85+
1. Create a site CR YAML file named `ha-site.yaml`, for example:
86+
87+
```yaml
88+
apiVersion: skupper.io/v2alpha1
89+
kind: Site
90+
metadata:
91+
name: ha-site
92+
namespace: west
93+
spec:
94+
ha: true
95+
linkAccess: default # Optional: configure external access
96+
```
97+
This YAML creates a high availability site named `ha-site` in the `west` namespace.
98+
99+
See [Setting site resources](#kube-site-resources-yaml) for more information about sizing the site.
100+
101+
2. Apply the YAML to create the site:
102+
103+
```bash
104+
kubectl apply -f ha-site.yaml
105+
```
106+
71107
<a id="kube-site-resources-yaml"></a>
72108
## Setting site resources
73109

input/kube-yaml/site-linking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ A connecting site redeems this token for a `Link` resource to establish a link t
113113
kubectl get link
114114
NAME STATUS REMOTE SITE MESSAGE
115115
token-to-west Ready my-site OK
116-
```
116+
```

0 commit comments

Comments
 (0)