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: README.md
+90-3
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Welcome to KubeIP v2, a complete overhaul of the popular [DoiT](https://www.doit
6
6
KubeIP [v1-main](https://github.com/doitintl/kubeip/tree/v1-main) open-source project, originally developed
7
7
by [Aviv Laufer](https://github.com/avivl).
8
8
9
-
KubeIP v2 expands its support beyond Google Cloud (as in v1) to include AWS, and it's designed to be extendable to other cloud providers
9
+
KubeIP v2 expands its support beyond Google Cloud (as in v1) to include AWS and Oracle Cloud Infrastructure(OCI), and it's designed to be extendable to other cloud providers
10
10
that allow assigning static public IP to VMs. We've also transitioned from a Kubernetes controller to a standard DaemonSet, enhancing
11
11
reliability and ease of use.
12
12
@@ -252,6 +252,93 @@ To use this feature, add the `filter` flag (or set `FILTER` environment variable
252
252
value: "labels.env=dev;labels.app=streamer"
253
253
```
254
254
255
+
### Oracle Cloud Infrastructure (OCI)
256
+
257
+
Make sure that KubeIP DaemonSet is deployed on nodes that have a public IP (node running in public subnet). Set the [compartment OCID](https://docs.oracle.com/en-us/iaas/Content/GSG/Tasks/contactingsupport_topic-Locating_Oracle_Cloud_Infrastructure_IDs.htm#Finding_the_OCID_of_a_Compartment) in the `project` flag (or
258
+
set `FILTER` environment variable) to the KubeIP DaemonSet:
259
+
260
+
```yaml
261
+
- name: PROJECT
262
+
value: "ocid1.compartment.oc1..test"
263
+
```
264
+
265
+
KubeIP will also need certain permissions to communicate with the OCI APIs. Follow these steps to set up the necessary permissions and generate the required API key and place it in the KubeIP DaemonSet:
266
+
267
+
1. Create a [user and group](https://docs.oracle.com/en/cloud/paas/integration-cloud/oracle-integration-gov/create-iam-group.html) in the OCI console and add the following [policy](https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingpolicies.htm) to the group:
268
+
269
+
```
270
+
Allow group <group_ocid> to manage public-ips in compartment id <compartment_ocid>
271
+
Allow group <group_ocid> to manage private-ips in compartment id <compartment_ocid>
272
+
Allow group <group_ocid> to manage vcns in compartment id <compartment_ocid>
273
+
```
274
+
275
+
2. Generate an [API Key](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#two) for the user and download the private key. Config file will look like this:
276
+
277
+
```
278
+
[DEFAULT]
279
+
user=ocid1.user.oc1..test
280
+
fingerprint=
281
+
key_file=/root/.oci/oci_api_key.pem
282
+
tenancy=ocid1.tenancy.oc1..test
283
+
region=us-ashburn-1
284
+
```
285
+
286
+
3. Add the following [secret](https://kubernetes.io/docs/concepts/configuration/secret/) to the KubeIP DaemonSet:
287
+
288
+
```yaml
289
+
apiVersion: v1
290
+
kind: Secret
291
+
metadata:
292
+
name: kubeip-oci-secret
293
+
namespace: kube-system
294
+
type: Opaque
295
+
data:
296
+
config: <base64_encoded_oci_config>
297
+
oci_api_key.pem: <base64_encoded_oci_api_key>
298
+
```
299
+
300
+
4. Create a volume and mount in the KubeIP DaemonSet to mount the secret:
301
+
302
+
```yaml
303
+
volumes:
304
+
- name: oci-config
305
+
secret:
306
+
secretName: kubeip-oci-secret
307
+
```
308
+
309
+
```yaml
310
+
volumeMounts:
311
+
- name: oci-config
312
+
mountPath: /root/.oci
313
+
```
314
+
315
+
5. Add the following environment variables to the KubeIP DaemonSet:
316
+
```yaml
317
+
- name: OCI_CONFIG_FILE
318
+
value: /root/.oci/config
319
+
```
320
+
321
+
KubeIP supports filtering of reserved Public IPs using tags. To use this feature, add the `filter` flag (or
322
+
set `FILTER` environment variable) to the KubeIP DaemonSet:
323
+
324
+
```yaml
325
+
- name: FILTER
326
+
value: "freeformTags.env=dev"
327
+
```
328
+
329
+
KubeIP OCI filter supports the following filter syntax:
330
+
331
+
- `freeformTags.<key>=<value>`
332
+
333
+
To specify multiple filters, separate them with a semicolon (`;`). For example:
0 commit comments