Kubernetes Operator
The official Kubernetes Operator for deploying Frontier clusters.
The Frontier Operator automates the deployment, provisioning, and scaling of Frontier and Frontlas clusters inside Kubernetes.
1. Install the CRD and Operator
First, clone the repository and apply the Custom Resource Definitions (CRDs):
git clone https://github.com/singchia/frontier.git
cd frontier/dist/crd
kubectl apply -f install.yamlVerify that the CRD is installed:
kubectl get crd frontierclusters.frontier.singchia.ioVerify that the Operator is running:
kubectl get all -n frontier-system2. Deploy a FrontierCluster
Create a file named frontiercluster.yaml. This example deploys 2 Frontier gateways and 1 Frontlas control plane relying on an existing Redis sentinel.
apiVersion: frontier.singchia.io/v1alpha1
kind: FrontierCluster
metadata:
name: my-frontier-cluster
spec:
frontier:
replicas: 2
servicebound:
port: 30011
edgebound:
port: 30012
frontlas:
replicas: 1
controlplane:
port: 40011
redis:
addrs:
- rfs-redisfailover:26379
password: your-password
masterName: mymaster
redisType: sentinelApply the cluster configuration:
kubectl apply -f frontiercluster.yaml3. Verify the Cluster
Within a minute, your HA cluster will be ready. You can check the status of the pods:
kubectl get all -l app=frontiercluster-frontier
kubectl get all -l app=frontiercluster-frontlas4. Connect your workloads
- Microservices: Should connect to
service/frontiercluster-frontlas-svc:40011 - Edge Nodes: Can connect to the NodePort where
:30012is exposed externally.