0% found this document useful (0 votes)
10 views

Kafka Vod Image Download Sync Consumer

This document defines a Kubernetes deployment configuration for a Kafka-ELK consumer application. The deployment will run 1 replica of the consumer container, pulling from an Azure container registry. It mounts a ConfigMap for configuration and an Azure file share for log storage. An init container waits for the Kafka cluster to be ready before starting the consumer containers.

Uploaded by

deep
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Kafka Vod Image Download Sync Consumer

This document defines a Kubernetes deployment configuration for a Kafka-ELK consumer application. The deployment will run 1 replica of the consumer container, pulling from an Azure container registry. It mounts a ConfigMap for configuration and an Azure file share for log storage. An init container waits for the Kafka cluster to be ready before starting the consumer containers.

Uploaded by

deep
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

####################################################

#Deployment of kafka-elk-consumer
#Version: v1
#Owner: Swapna Vemula and Akash Narayan
#Date: 28 january 2021
#####################################################
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-vod-image-download-sync-consumer-deployment
namespace: ipdemo
annotations:
kubernetes.io/change-cause: "kubectl set image deployment.v1.apps/kafka-vod-
image-download-sync-consumer-deployment
tepacr01.azurecr.io/kafka_vod_image_download_sync_consumer=tepacr01.azurecr.io/
kafka_vod_image_download_sync_consumer:IMAGE_VERSION --record=true"
spec:
replicas: 1
selector:
matchLabels:
app: kafka-vod-image-download-sync-consumer
type: teplay
template:
metadata:
labels:
app: kafka-vod-image-download-sync-consumer
type: teplay
spec:
# tolerations:
# - key: "node"
# operator: "Equal"
# value: "cms"
# effect: "NoExecute"
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: node
# operator: In
# values:
# - cms
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
type: teplay
containers:
#image pointing to ACR repository
- image:
tepacr01.azurecr.io/kafka_vod_image_download_sync_consumer:IMAGE_VERSION
name: kafka-image-download-sync-consumer
#ResourceLimits
resources:
requests:
memory: "250Mi"
cpu: "50m"
limits:
memory: "6000Mi"
cpu: "3000m"
# MountPath (Destination) of the Container
volumeMounts:
- mountPath: "/cms-api/common/cmsconfig.js"
subPath: cmsconfig.js
name: config-cms
- mountPath: /mount/images
name: tep-demo-01
# - mountPath: "/usr/share/dockerlogs/data"
# name: azure-log
# ConfigMap (Source)
volumes:
- name: config-cms
configMap:
name: config-cms
- name: tep-demo-01
csi:
driver: file.csi.azure.com
readOnly: false
volumeAttributes:
secretName: azure-sa-secret # required
shareName: tep-demo-01 # required
mountOptions: "dir_mode=0777,file_mode=0777,cache=strict,actimeo=30" #
optional
# - name: azure-log
# csi:
# driver: file.csi.azure.com
# volumeAttributes:
# secretName: azure-sa-secret # required
# shareName: bheemlog/kafka-elk-consumer # required
# mountOptions: "dir_mode=0777,file_mode=0777,cache=strict,actimeo=30"
# optional
initContainers:
- name: init-kafka
image: busybox:1.28
command: ['sh', '-c',"until nslookup ipdemo-kafka-
bootstrap.kafka.svc.cluster.local; do echo waiting for kafka pods to be in running
state;sleep 5;done"]
# #nodeSelector:
# #node: cms
---
apiVersion: v1
kind: Service
metadata:
name: kafka-vod-image-download-sync-consumer
namespace: ipdemo
spec:
type: ClusterIP
selector:
app: kafka-vod-image-download-sync-consumer
ports:
- port: 80

You might also like