Skip to content
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

Implement controller to assign IP manually for pod #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mraerino
Copy link
Contributor

@mraerino mraerino commented Feb 6, 2022

This can be useful when other means of routing the traffic to a pod than a load balancer are used.

E.g. you could be using the ipvlan CNI plugin with Multus.

Example setup
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: coturn
  namespace: turn
spec:
  selector:
    matchLabels:
      app: turn
  template:
    metadata:
      labels:
        app: turn
        hcloud-ip-floater.cstl.dev/floating-ip: "78.47.226.156"
      annotations:
        k8s.v1.cni.cncf.io/networks: |
          [
            {
              "name": "relay-net",
              "ips": ["78.47.226.156/32"]
            }
          ]
    spec:
      # ...

---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: relay-net
  namespace: turn
spec:
  config: |
    {
      "cniVersion": "0.3.1",
      "type": "ipvlan",
      "master": "eth0",
      "mode": "l2",
      "ipam": {
        "type": "static"
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant