Skip to content

Commit

Permalink
chore: Static IP documentation touch-up
Browse files Browse the repository at this point in the history
  • Loading branch information
cimomo committed Apr 19, 2019
1 parent b510016 commit 524845e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions docs/static-ip.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Static IP

Kube-OVN support a static ip for a single Pod and a static IP pool for a workload with multiple pods (deployment/daemonset/statefulset), by adding annotations to the pod spec template.
Kube-OVN supports allocation a static IP address for a single Pod, or a static IP pool for a Workload with multiple Pods (Deployment/DaemonSet/StatefulSet). To enable this feature, add the following annotations to the Pod spec template.

## For a Single Pod
## For a single Pod

Use following annotations to stabilize the address
- `ovn.kubernetes.io/ip_address`: stabilize ip address
- `ovn.kubernetes.io/mac_address`: stabilize mac address
Use the following annotations to specify the address
- `ovn.kubernetes.io/ip_address`: Specifies IP address
- `ovn.kubernetes.io/mac_address`: Specifies MAC address

Example:
```bash
Expand All @@ -26,14 +26,14 @@ spec:

**Note**:

1. The address **SHOULD** be in the cidr of related switch.
2. The address **SHOULD NOT** be conflicted with already allocated addresses.
3. Static mac address is optional.
1. The address **SHOULD** be in the CIDR of related switch.
2. The address **SHOULD NOT** conflict with addresses already allocated.
3. The static MAC address is optional.

## For Workload
## For Workloads

Use following annotation to allocate addresses for a workload:
- `ovn.kubernetes.io/ip_pool`: For deployment/daemonset will random choose an available ip for pod. For statefulset the ip allocation will by the list index order.
Use the following annotation to allocate addresses for a Workload:
- `ovn.kubernetes.io/ip_pool`: For Deployments/DaemonSets, we will randomly choose an available IP address for a Pod. For StatefulSets, the IP allocation will follow the order specified in the list.

Example:
```bash
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:

**Note**:

1. The address **SHOULD** be in the cidr of related switch.
2. The address **SHOULD NOT** be conflicted with already allocated addresses.
3. If ip_pool size less than replicas, exceeding pod will not running.
2. Take care of scaling and update strategy to avoid no available address for new pod.
1. The address **SHOULD** be in the CIDR of the related switch.
2. The address **SHOULD NOT** conflict with addresses already allocated.
3. If the `ip_pool` size is smaller than the replica count, some Pods will not start.
2. Care should be taken for scaling and updates to ensure there are addresses available for new Pods.

0 comments on commit 524845e

Please sign in to comment.