You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en_US/deploy/kubernetes/operator/aws-eks.md
+40-29Lines changed: 40 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,28 @@
1
1
# Deploy EMQX on Amazon Elastic Kubernetes Service
2
2
3
-
EMQX Operator supports deploying EMQX on Amazon Container Service EKS (Elastic Kubernetes Service). Amazon EKS is a managed Kubernetes service that makes it easy to deploy, manage, and scale containerized applications. EKS provides the Kubernetes control plane and node groups, automatically handling node replacements, upgrades, and patching. It supports AWS services such as Load Balancers, RDS, and IAM, and integrates seamlessly with other Kubernetes ecosystem tools. For details, please see [What is Amazon EKS](https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html)
3
+
EMQX Operator supports running on Amazon Container Service EKS (Elastic Kubernetes Service). Amazon EKS is a managed Kubernetes service that makes it easy to deploy, manage, and scale containerized applications. EKS provides the Kubernetes control plane and node groups, automatically handling node replacements, upgrades, and patching. It supports AWS services such as Load Balancers, RDS, and IAM, and integrates seamlessly with other Kubernetes ecosystem tools.
4
+
5
+
For a deeper introduction, please refer to [What is Amazon EKS](https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html).
4
6
5
7
## Before You Begin
6
8
7
9
Before you begin, you must have the following:
8
10
9
-
- Activate Amazon Container Service and create an EKS cluster. For details, please refer to:[Create an Amazon EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html)
11
+
- Activate Amazon Container Service and create an EKS cluster.<br/>Please refer to [Create an Amazon EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html) for more details.
10
12
11
-
- Connect to EKS cluster by installing kubectl tool locally: For details, please refer to:[Using kubectl to connect to the cluster](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#eks-configure-kubectl)
13
+
- Connect to EKS cluster by installing kubectl tool locally.<br/>Refer to[Using kubectl to connect to the cluster](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#eks-configure-kubectl) for more details.
12
14
13
-
- Deploy an AWS Load Balancer Controller on a cluster, for details, please refer to: [Create a Network Load Balancer](https://docs.aws.amazon.com/eks/latest/userguide/network-load-balancing.html)
15
+
- Deploy an AWS Load Balancer Controller on a cluster.<br/>See [Create a Network Load Balancer](https://docs.aws.amazon.com/eks/latest/userguide/network-load-balancing.html) for more details.
14
16
15
-
- Install the Amazon EBS CSI driver on the cluster, for details, please refer to: [Amazon EBS CSI driver](https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html)
17
+
- Install the Amazon EBS CSI driver on the cluster.<br/>See [Amazon EBS CSI driver](https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html) for further details.
- Install EMQX Operator.<br/>Please refer to [Install EMQX Operator](../getting-started/getting-started.md) for further details.
18
20
19
-
## Quickly Deploy an EMQX Cluster
21
+
## Deploy EMQX Cluster Quickly
20
22
21
-
The following is the relevant configuration of EMQX custom resources.
23
+
The following is the relevant configuration of an EMQX Custom Resource (CR).
22
24
23
-
+ Save the following content as a YAML file and deploy it via the `kubectl apply` command
25
+
+ Save the following content as a YAML file and deploy it with `kubectl apply`.
24
26
25
27
```yaml
26
28
# Configure EBS StorageClass with WaitForFirstConsumer binding mode
@@ -37,7 +39,7 @@ The following is the relevant configuration of EMQX custom resources.
37
39
metadata:
38
40
name: emqx
39
41
spec:
40
-
image: emqx/emqx-enterprise:@EE_VERSION@
42
+
image: emqx/emqx:@EE_VERSION@
41
43
config:
42
44
data: |
43
45
license {
@@ -77,37 +79,44 @@ The following is the relevant configuration of EMQX custom resources.
77
79
loadBalancerClass: service.k8s.aws/nlb
78
80
```
79
81
80
-
+ Wait for EMQX cluster to be ready, you can check the status of EMQX cluster through `kubectl get` command, please make sure that `STATUS` is `Running`, this may take some time
82
+
+ Wait for EMQX cluster to become ready.
83
+
84
+
Check the status of EMQX cluster through `kubectl get` command, make sure that `STATUS` is `Ready`. This may take some time.
81
85
82
86
```bash
83
-
$ kubectl get emqx emqx
84
-
NAME IMAGE STATUS AGE
85
-
emqx emqx/emqx-enterprise:@EE_VERSION@ Running10m
87
+
$ kubectl get emqx
88
+
NAME STATUS AGE
89
+
emqx Ready 55s
86
90
```
87
91
88
-
+ Obtain Dashboard External IP of EMQX cluster and access EMQX console
92
+
+ Obtain external IP of the EMQX Dashboard and access it.
89
93
90
-
EMQX Operator will create two EMQX Service resources, one is emqx-dashboard and the other is emqx-listeners, corresponding to EMQX console and EMQX listening port respectively.
94
+
EMQX Operator will create a Service resource for the EMQX Dashboard according to the `dashboardServiceTemplate` configuration.
91
95
92
96
```bash
93
-
$ kubectl get svc emqx-dashboard -o json | jq '.status.loadBalancer.ingress[0].ip'
Access `http://192.168.1.200:18083` through a browser, and use the default username and password `admin/public` to login EMQX console.
101
+
Access `http://192.168.1.200:18083` through the browser.
102
+
103
+
Use the default username `admin` and password `public` to log into the EMQX Dashboard.
104
+
105
+
## Subscribe and Publish
99
106
100
-
## Use MQTTX application To Publish/Subscribe Messages
107
+
+ Get [MQTTX CLI](https://mqttx.app/cli) ready.
101
108
102
-
[MQTTX CLI](https://mqttx.app/cli) is an open source MQTT 5.0 command line client tool, designed to help developers to more Quickly develop and debug MQTT services and applications.
109
+
MQTTX CLI is an open source MQTT 5.0 command line client tool, designed to help developers to start using MQTT services and applications quickly.
103
110
104
-
+ Obtain External IP of EMQX cluster
111
+
+ Obtain the external IP of the EMQX TCP listener.
112
+
113
+
EMQX Operator will create a respective Service resource for the configured listeners.
105
114
106
115
```bash
107
-
external_ip=$(kubectl get svc emqx-listeners -o json | jq '.status.loadBalancer.ingress[0].ip')
116
+
external_ip=$(kubectl get svc emqx-listeners -o json | jq -r '.status.loadBalancer.ingress[0].ip')
108
117
```
109
118
110
-
+ Subscribe to news
119
+
+ Subscribe to messages.
111
120
112
121
```bash
113
122
$ mqttx sub -t 'hello' -h ${external_ip} -p 1883
@@ -118,7 +127,7 @@ The following is the relevant configuration of EMQX custom resources.
118
127
[10:00:25] › ✔ Subscribed to hello
119
128
```
120
129
121
-
+ create a new terminal window and publish message
130
+
+ In a separate shell, connect to the EMQX cluster and publish a message.
@@ -129,15 +138,15 @@ The following is the relevant configuration of EMQX custom resources.
129
138
[10:00:58] › ✔ Message published
130
139
```
131
140
132
-
+ View messages received in the subscribed terminal window
141
+
+ Observe the subscriber client receiving the message.
133
142
134
143
```bash
135
144
[10:00:58] › payload: hello world
136
145
```
137
146
138
-
## Terminate TLS Encryption With LoadBalancer
147
+
## Terminate TLS Encryption with LoadBalancer
139
148
140
-
On Amazon EKS, you can use the NLB to do TLS termination, which you can do in the following steps:
149
+
On Amazon EKS, you can use the NLB to terminate TLS encryption. Follow these steps:
141
150
142
151
1. Import relevant certificates in [AWS Console](https://us-east-2.console.aws.amazon.com/acm/home), then enter the details page by clicking the certificate ID, Then record the ARN information
143
152
@@ -159,4 +168,6 @@ On Amazon EKS, you can use the NLB to do TLS termination, which you can do in th
0 commit comments