Skip to content

Commit 92784b9

Browse files
Haaroleangitbook-bot
authored andcommitted
GITBOOK-15: Add a MSK guide (thx @Narekmat)
1 parent 7e40fef commit 92784b9

File tree

8 files changed

+97
-17
lines changed

8 files changed

+97
-17
lines changed

SUMMARY.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323

2424
## 👷♂ Configuration
2525

26-
* [Configuration](configuration/configuration/README.md)
27-
* [Required ACLs](configuration/configuration/required-acls.md)
28-
* [Complex configuration examples](configuration/configuration/complex-configuration-examples/README.md)
29-
* [Kraft mode + multiple brokers](configuration/configuration/complex-configuration-examples/kraft-mode-+-multiple-brokers.md)
26+
* [Permissions](configuration/permissions/README.md)
27+
* [Required Kafka ACLs](configuration/permissions/required-kafka-acls.md)
28+
* [MSK (+Serverless) Setup](configuration/permissions/msk-+serverless-setup.md)
29+
* [Complex configuration examples](configuration/complex-configuration-examples/README.md)
30+
* [Kraft mode + multiple brokers](configuration/complex-configuration-examples/kraft-mode-+-multiple-brokers.md)
3031
* [SSL](configuration/ssl.md)
3132
* [Authentication](configuration/authentication/README.md)
3233
* [OAuth2](configuration/authentication/oauth2.md)

configuration/configuration/README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

configuration/permissions/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Permissions
2+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# MSK (+Serverless) Setup
2+
3+
This guide has been written for MSK Serverless but is applicable for MSK in general as well.
4+
5+
## Creating an instance
6+
7+
1. Go to the MSK page
8+
2. Click "create cluster"
9+
3. Choose "Custom create"
10+
4. Choose "Serverless"
11+
5. Choose VPC and subnets
12+
6. Choose the default security group or use the existing one
13+
14+
### Creating a policy
15+
16+
1. Go to IAM policies
17+
2. Click "create policy"
18+
3. Click "JSON"
19+
4. Paste the following policy example in the editor, and replace "MSK ARN" with the ARN of your MSK cluster
20+
21+
```
22+
{
23+
"Version": "2012-10-17",
24+
"Statement": [
25+
{
26+
"Sid": "VisualEditor0",
27+
"Effect": "Allow",
28+
"Action": [
29+
"kafka-cluster:DescribeCluster",
30+
"kafka-cluster:AlterCluster",
31+
"kafka-cluster:Connect"
32+
],
33+
"Resource": "arn:aws:kafka:eu-central-1:297478128798:cluster/test-wizard/7b39802a-21ac-48fe-b6e8-a7baf2ae2533-s2"
34+
},
35+
{
36+
"Sid": "VisualEditor1",
37+
"Effect": "Allow",
38+
"Action": [
39+
"kafka-cluster:DeleteGroup",
40+
"kafka-cluster:DescribeCluster",
41+
"kafka-cluster:ReadData",
42+
"kafka-cluster:DescribeTopicDynamicConfiguration",
43+
"kafka-cluster:AlterTopicDynamicConfiguration",
44+
"kafka-cluster:AlterGroup",
45+
"kafka-cluster:AlterClusterDynamicConfiguration",
46+
"kafka-cluster:AlterTopic",
47+
"kafka-cluster:CreateTopic",
48+
"kafka-cluster:DescribeTopic",
49+
"kafka-cluster:AlterCluster",
50+
"kafka-cluster:DescribeGroup",
51+
"kafka-cluster:DescribeClusterDynamicConfiguration",
52+
"kafka-cluster:Connect",
53+
"kafka-cluster:DeleteTopic",
54+
"kafka-cluster:WriteData"
55+
],
56+
"Resource": "arn:aws:kafka:eu-central-1:297478128798:topic/test-wizard/7b39802a-21ac-48fe-b6e8-a7baf2ae2533-s2/*"
57+
},
58+
{
59+
"Sid": "VisualEditor2",
60+
"Effect": "Allow",
61+
"Action": [
62+
"kafka-cluster:AlterGroup",
63+
"kafka-cluster:DescribeGroup"
64+
],
65+
"Resource": "arn:aws:kafka:eu-central-1:297478128798:group/test-wizard/7b39802a-21ac-48fe-b6e8-a7baf2ae2533-s2/*"
66+
}
67+
]
68+
}
69+
```
70+
71+
### Attaching the policy to a user
72+
73+
#### Creating a role for EC2
74+
75+
1. Go to IAM
76+
2. Click "Create role"
77+
3. Choose AWS Services and EC2
78+
4. On the next page find the policy which has been created in the previous step
79+
80+
### Attaching the role to the EC2 instance
81+
82+
1. Go to EC2
83+
2. Choose your EC2 with Kafka-UI
84+
3. Go to Actions -> Security -> Modify IAM role
85+
4. Choose the IAM role from previous step
86+
5. Click Update IAM role

configuration/configuration/required-acls.md renamed to configuration/permissions/required-kafka-acls.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
description: ACLs required to run the app
33
---
44

5-
# Required ACLs
5+
# Required Kafka ACLs
66

7-
## Standalone kafka
7+
## ACLs for standalone kafka
88

99
This list is enough to run the app in r/o mode
1010

@@ -18,12 +18,5 @@ This list is enough to run the app in r/o mode
1818
ALLOW | DESCRIBE_CONFIGS | CLUSTER | kafka-cluster | LITERAL
1919
```
2020

21-
## MSK
2221

23-
```
24-
"kafka-cluster:Connect",
25-
"kafka-cluster:Describe*",
26-
"kafka-cluster:CreateTopic",
27-
"kafka-cluster:AlterGroup",
28-
"kafka-cluster:ReadData"
29-
```
22+

faq/common-problems.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Good resource for what properties are needed here: https://gist.github.com/rmoff
1010

1111
## Cluster authorization failed
1212

13-
Check the [required permissions](../configuration/configuration/required-acls.md).
13+
Check the [required permissions](../configuration/permissions/required-kafka-acls.md).
1414

1515
## Confluent cloud errors
1616

0 commit comments

Comments
 (0)