Connect Your Cluster

Each cluster deployment exposes 3 services with the prefix of your cluster name.
For example, kubemq-cluster as cluster name:
Service
Name
Default Port
gRPC
kubemq-cluster-grpc
50000
Rest
kubemq-cluster-rest
9090
API
kubemq-cluster-api
8080

Each cluster deployment exposes 3 services with the prefix of your cluster name.
Use Kubernetes DNS resolving for accessing cluster services.
For example, namespace is kubemq and cluster name is kubemq-cluster with cluster.local domain name:
Service
Name
Default Port
gRPC
kubemq-cluster-grpc.kubemq.svc.cluster.local
50000
Rest
kubemq-cluster-rest.kubemq.svc.cluster.local
9090
API
kubemq-cluster-api.kubemq.svc.cluster.local
8080

Kubemqctl
Helm
yaml
kubemqctl create cluster --grpc-expose LoadBalancer
helm install kubemq-cluster --set grpc.expose=LoadBalancer -n kubemq kubemq-charts/kubemq
apiVersion: core.k8s.kubemq.io/v1alpha1
kind: KubemqCluster
metadata:
name: kubemq-cluster
namesapce: kubemq
labels:
app: kubemq-cluster
spec:
replicas: 3
grpc:
expose: LoadBalancer

Kubemqctl
Helm
yaml
kubemqctl create cluster --rest-expose LoadBalancer
helm install kubemq-cluster --set rest.expose=LoadBalancer -n kubemq kubemq-charts/kubemq
apiVersion: core.k8s.kubemq.io/v1alpha1
kind: KubemqCluster
metadata:
name: kubemq-cluster
namesapce: kubemq
labels:
app: kubemq-cluster
spec:
replicas: 3
rest:
expose: LoadBalancer

Kubemqctl
Helm
yaml
kubemqctl create cluster --api-expose LoadBalancer
helm install kubemq-cluster --set api.expose=LoadBalancer -n kubemq kubemq-charts/kubemq
apiVersion: core.k8s.kubemq.io/v1alpha1
kind: KubemqCluster
metadata:
name: kubemq-cluster
namesapce: kubemq
labels:
app: kubemq-cluster
spec:
replicas: 3
api:
expose: LoadBalancer

Expose the required service via node port and access the service with host:port defined.

Kubemqctl
Helm
yaml
kubemqctl create cluster --grpc-expose NodePort --grpc-node-port 30500
helm install kubemq-cluster --set grpc.expose=NodePort,grpc-nodePort=30500 -n kubemq kubemq-charts/kubemq
apiVersion: core.k8s.kubemq.io/v1alpha1
kind: KubemqCluster
metadata:
name: kubemq-cluster
namesapce: kubemq
labels:
app: kubemq-cluster
spec:
replicas: 3
grpc:
expose: NodePort
nodePort: 30500

Kubemqctl
Helm
yaml
kubemqctl create cluster --rest-expose NodePort --rest-node-port 30600
helm install kubemq-cluster --set rest.expose=NodePort,rest-nodePort=30600 -n kubemq kubemq-charts/kubemq
apiVersion: core.k8s.kubemq.io/v1alpha1
kind: KubemqCluster
metadata:
name: kubemq-cluster
namesapce: kubemq
labels:
app: kubemq-cluster
spec:
replicas: 3
rest:
expose: NodePort
nodePort: 30500

Kubemqctl
Helm
yaml
kubemqctl create cluster --api-expose NodePort --api-node-port 30700
helm install kubemq-cluster --set api.expose=NodePort,api-nodePort=30700 -n kubemq kubemq-charts/kubemq
apiVersion: core.k8s.kubemq.io/v1alpha1
kind: KubemqCluster
metadata:
name: kubemq-cluster
namesapce: kubemq
labels:
app: kubemq-cluster
spec:
replicas: 3
api:
expose: NodePort
nodePort: 30500

Kubemqctl CLI tool provides a very useful command which port-forward all cluster services ports of selected cluster to localhost.
Run:
kubemqctl set cluster proxy
Will show :
Current Kubernetes cluster context connection: kubernetes-local
? Select Kubemq cluster to Proxy kubemq/kubemq-cluster
Current Kubernetes cluster context connection: kubernetes-local
Connecting to kuberenets cluster...Ok.
start proxy for kubemq/kubemq-cluster-1. press CTRL C to close.
kubemq/kubemq-cluster-1:8080 -> 127.0.0.1:8080
kubemq/kubemq-cluster-1:9090 -> 127.0.0.1:9090
kubemq/kubemq-cluster-1:50000 -> 127.0.0.1:50000
Copy link
On this page
Inside Cluster (Service-To-Service)
Connect within the same namespace
Connect from external namespace
Outside Cluster
Connect with Load Balancer
Connect with Node Port
Connect with Kubemqctl as Proxy