A demo from Kafka Summit NYC https://speaking.gamov.io/eZuDRU/kafka-on-kubernetes-does-it-really-have-to-be-the-hard-way
-
GCP cluster name:
demo-test
-
AWS cluster:
eks-test
-
Move `mv <Download_path>/aws-iam-authenticator_0.4.0-alpha.1_darwin_amd64 aws-iam-authenticator
-
configure below on the
.kube/config
pathaws eks --region us-west-2 update-kubeconfig --name eks-test
export VALUE_PATH=/Users/viktor/workspace/k-demo helm install -f ${VALUE_PATH}/gcp/gcp.yaml --name external-dns --namespace kube-system --set externaldns.enabled=true --set global.externaldns.user=platform-semaphore@platform-eng-204922.iam.gserviceaccount.com ./confluent-operator
Create IAM Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"route53:ListHostedZones",
"route53:ListResourceRecordSets"
],
"Resource": ["_"]
},
{
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets"
],
"Resource": ["_"]
}
]
}
export VALUE_PATH=/Users/viktor/projects/k-demo
helm install -f $\{VALUE_PATH}/aws/aws.yaml --name external-dns --namespace kube-system --set externaldns.enabled=true ./confluent-operator
Check Route54 or GCP DNS, if configurations are not there delete the external-dns pod running on the kubesystem (sometime it takes more time)
$PATH
export VALUE_PATH=/Users/viktor/projects/k-demo
# AWS:
scripts/deployCP.sh -c operator -p aws -f $\{VALUE_PATH}/aws/aws.yaml --debug
scripts/deployCP.sh -c zookeeper -p aws -f $\{VALUE_PATH}/aws/aws.yaml --debug
scripts/deployCP.sh -c kafka -p aws -f $\{VALUE_PATH}/aws/aws.yaml --debug
scripts/deployCP.sh -c controlcenter -p aws -f $\{VALUE_PATH}/aws/aws.yaml --debug
# GCP:
scripts/deployCP.sh -c zookeeper -p gcp -f ${VALUE_PATH}/gcp/gcp.yaml --debug
scripts/deployCP.sh -c kafka -p gcp -f ${VALUE_PATH}/gcp/gcp.yaml --debug
scripts/deployCP.sh -c replicator -p gcp -f ${VALUE_PATH}/gcp/gcp.yaml --debug
scripts/deployCP.sh -c controlcenter -p gcp -f ${VALUE_PATH}/gcp/gcp.yaml --debug
## scripts/deployCP.sh -c all -p gcp -f ${VALUE_PATH}/gcp/gcp.yaml --debug
$\{VALUE_PATH}/k-demo/scripts/validateKafkaCluster.sh operator kafka #(1)
-
use dig command to validate if the DNS is resolved (during demo, you should deploy before hand otherwise the resolve will take time.)
kafka-broker-api-versions --command-config aws/kafka.properties --bootstrap-server kafka.platformops.aws.devel.cpdev.cloud:9092
-
GCP
ccloud -c gcp/ topic create example --replication-factor 3
-
AWS
ccloud -c aws/ topic create example --replication-factor 3
-
GCP
seq 10000 | kafka-console-producer --topic example --broker-list kafka.platformops.dev.gcp.devel.cpdev.cloud:9092 --producer.config gcp/kafka.properties
-
AWS
seq 10000 | kafka-console-producer --topic example --broker-list kafka.platformops.aws.devel.cpdev.cloud:9092 --producer.config aws/kafka.properties
-
GCP:
kafka-console-consumer --from-beginning --topic example --bootstrap-server kafka.platformops.dev.gcp.devel.cpdev.cloud:9092 -consumer.config gcp/kafka.properties
-
AWS:
kafka-console-consumer --from-beginning --topic example --bootstrap-server kafka.platformops.aws.devel.cpdev.cloud:9092 -consumer.config aws/consumer.properties