Changeset 15:6b84781f3f5a
Updated manifests
author | unexist |
---|---|
date | Wed, 01 Sep 2021 16:35:55 +0200 |
parents | 0cc60b734c4b |
children | 6b1fd96410ef |
files | README.adoc deployment/kubernetes/redpanda/kustomization.yaml deployment/kubernetes/redpanda/redpanda-deployment.yaml deployment/kubernetes/redpanda/redpanda-service.yaml |
diffstat | 4 files changed, 43 insertions(+), 59 deletions(-) [+] |
line wrap: on
line diff
--- a/README.adoc Wed Sep 01 10:17:24 2021 +0200 +++ b/README.adoc Wed Sep 01 16:35:55 2021 +0200 @@ -17,7 +17,6 @@ ```shell kubectl apply -f https://github.com/knative/operator/releases/download/v0.25.0/operator.yaml -kubectl apply -f https://github.com/knative/serving/releases/download/v0.25.0/serving-default-domain.yaml ``` ```shell @@ -46,6 +45,10 @@ EOF ``` +```shell +kubectl apply -f https://github.com/knative/serving/releases/download/v0.25.0/serving-default-domain.yaml +``` + == Install Kourier and configure DNS ```shell @@ -71,8 +74,6 @@ brew install knative/client/kn ``` - - == Verify installation === Check knative-eventing @@ -113,44 +114,16 @@ == Install Kafka ```shell +kubectl create namespace kafka +kubectl create -f 'https://strimzi.io/install/latest?namespace=kafka' -n kafka +kubectl apply -f https://strimzi.io/examples/latest/kafka/kafka-persistent-single.yaml -n kafka +``` + +== Install Redpanda + +```shell kubectl apply -f - <<EOF -apiVersion: v1 -kind: Service -metadata: - name: redpanda -spec: - ports: - - name: http - port: 9092 - targetPort: 9092 - selector: - app.kubernetes.io/name: redpanda - type: ClusterIP ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/name: redpanda - name: redpanda -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: redpanda - template: - metadata: - labels: - app.kubernetes.io/name: redpanda - spec: - containers: - - name: redpanda - image: vectorized/redpanda:latest - imagePullPolicy: Always - ports: - - containerPort: 9092 - name: http - protocol: TCP + EOF ```
--- a/deployment/kubernetes/redpanda/kustomization.yaml Wed Sep 01 10:17:24 2021 +0200 +++ b/deployment/kubernetes/redpanda/kustomization.yaml Wed Sep 01 16:35:55 2021 +0200 @@ -1,5 +1,5 @@ -namespace: default +namespace: redpanda resources: - redpanda-service.yaml - - redpanda-deployment.yaml \ No newline at end of file + - redpanda-deployment.yaml
--- a/deployment/kubernetes/redpanda/redpanda-deployment.yaml Wed Sep 01 10:17:24 2021 +0200 +++ b/deployment/kubernetes/redpanda/redpanda-deployment.yaml Wed Sep 01 16:35:55 2021 +0200 @@ -1,27 +1,40 @@ apiVersion: apps/v1 kind: Deployment metadata: + name: redpanda-deployment labels: - app.kubernetes.io/name: redpanda - name: redpanda + app: redpanda spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/name: redpanda + app: redpanda template: metadata: labels: - app.kubernetes.io/name: redpanda + app: redpanda spec: + + initContainers: + - name: redpanda-configurator + image: vectorized/redpanda:latest + command: [ "/bin/sh", "-c" ] + args: + - > + CONFIG=/etc/redpanda/redpanda.yaml; + NODE_ID=0; + SERVICE_NAME=redpanda-service.redpanda; + rpk --config $CONFIG config set redpanda.node_id $NODE_ID; + if [ "$NODE_ID" = "0" ]; then + rpk --config $CONFIG config set redpanda.seed_servers '[]' --format yaml; + fi; + rpk --config $CONFIG config set redpanda.advertised_rpc_api.address $SERVICE_NAME; + rpk --config $CONFIG config set redpanda.advertised_kafka_api.address $SERVICE_NAME; containers: - name: redpanda image: vectorized/redpanda:latest imagePullPolicy: Always ports: - - name: kafka + - name: kafka-tcp containerPort: 9092 - protocol: TCP - - name: rpc - containerPort: 33145 protocol: TCP \ No newline at end of file
--- a/deployment/kubernetes/redpanda/redpanda-service.yaml Wed Sep 01 10:17:24 2021 +0200 +++ b/deployment/kubernetes/redpanda/redpanda-service.yaml Wed Sep 01 16:35:55 2021 +0200 @@ -1,18 +1,16 @@ apiVersion: v1 kind: Service metadata: - name: redpanda + name: redpanda-service labels: - networking.knative.dev/visibility: cluster-local - app.kubernetes.io/name: redpanda + app: redpanda spec: type: ClusterIP + publishNotReadyAddresses: true ports: - - name: kafka + - name: kafka-tcp port: 9092 - targetPort: 9092 - - name: rpc - port: 33145 - targetPort: 33145 + targetPort: kafka-tcp + protocol: TCP selector: - app.kubernetes.io/name: redpanda \ No newline at end of file + app: redpanda \ No newline at end of file