RingLinkRingLink
Containers/Kubernetes

Expose a Kubernetes cluster workload

Use the RingLink Kubernetes Operator to expose workloads in your cluster to a RingLink network.

To get started, define a Service with type: LoadBalancer, and set the loadBalancerClass to ringlink. This makes your service reachable over RingLink.

Prerequisites

Expose a Kubernetes Service

To expose a Kubernetes Service over RingLink, follow these steps:

Set spec.type to LoadBalancer.

Set spec.loadBalancerClass to ringlink.

Add the annotation networking.ring.link/load-balancer-type with the value internal.

After setup, the Service will show an IP address from your RingLink network.

Check the status with:

kubectl get service <service-name>

You should also see a new device listed under the Networks tab in the RingLink dashboard.

Example configuration:

apiVersion: v1
kind: Service
metadata:
  name: ringlink-lb
  annotations:
    networking.ring.link/load-balancer-type: "internal"
spec:
  type: LoadBalancer
  loadBalancerClass: ringlink
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80

Expected output:

root@localhost:~# kubectl get svc ringlink-lb
NAME               TYPE           CLUSTER-IP     EXTERNAL-IP    PORT(S)        AGE
ringlink-lb        LoadBalancer   10.43.29.231   172.29.0.108   80:31088/TCP   9s

Expose a Service to a specific network

If you're working with multiple RingLink networks, you can bind a Service to a specific one:

Create a RingLinkConfiguration for the target network:

apiVersion: ring.link/v1
kind: RingLinkConfiguration
metadata:
  name: ringlink-08132e98
spec:
  network: 08132e98
  secretName: ringlink-token

Add the networking.ring.link/config annotation to the Service:

apiVersion: v1
kind: Service
metadata:
  name: ringlink-lb
  annotations:
    networking.ring.link/config: "ringlink-08132e98"
    networking.ring.link/load-balancer-type: "internal"
spec:
  type: LoadBalancer
  loadBalancerClass: ringlink
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80

On this page