RingLinkRingLink
Containers/Kubernetes

Expose a Kubernetes cluster workload to Public Internet

Use the RingLink Kubernetes Operator to expose workloads in your cluster to Public Internet.

To get started, define a Service with type: LoadBalancer, and set the loadBalancerClass to ringlink.

Prerequisites

Expose a Kubernetes Service

To expose a Kubernetes Service to public internet, 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 external.

Add the annotation networking.ring.link/load-balancer-zone with the value us-west to public your service in US.

After setup, the Service will show an DNS name can be reachable via public internet.

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: "external"
    networking.ring.link/load-balancer-zone: "lax27-a"
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   right-neglect.elb.com   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: "external"
    networking.ring.link/load-balancer-zone: "lax27-a"
spec:
  type: LoadBalancer
  loadBalancerClass: ringlink
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80

Custom region to publish

If you want to publish your service to another region, change annotation networking.ring.link/load-balancer-zone to your desired region.

Available Region are:

zone codelocation
hkg01-aHong Kong
sea01-aSeattle
tyo05-aTokyo
can01-aGuangzhou
lax27-aLos Angeles
fra27-aFrankfurt
iad27-aAshburn
sha03-aShanghai
syd27-aSydney

On this page