k8s(196)
-
PV는 수동으로 만들고, StatefulSet과 동적으로 연결
PVapiVersion: v1kind: PersistentVolumemetadata: name: zookeeper-pv-0spec: capacity: storage: 5Gi accessModes: - ReadWriteOnce storageClassName: zookeeper-storage # Changed from nfs-storage to zookeeper-storage persistentVolumeReclaimPolicy: Retain claimRef: namespace: kafka name: data-zookeeper-0 # Ensures only this PVC binds to this PV nfs: path: /mnt/nfs/zookeeper-0 ..
2025.02.28 -
StatefulSet에 동적으로 pvc 바인딩하기
동적 pvc 생성 규칙# 규칙--# 샘플apiVersion: apps/v1kind: StatefulSetmetadata: name: zookeeper namespace: kafka생략volumeClaimTemplates: - metadata: name: data # Base name for PVCs spec: accessModes: ["ReadWriteOnce"] resources: requests: storage: 5Gi# 예상되는 pvc 이름data-zookeeper-0data-zookeeper-1data-zookeeper-2# pv 바인딩data-zookeeper-0 → zookeeper-0data-zookeeper-1 → zook..
2025.02.28 -
mount시 권한 처리
pod의 uid:gid=1000:1000이고, host server의 uid:gid=1001:1001인 경우 mount 방법host server에서 디렉토리를 만들면, 1001:1001로 디렉토리가 생성됨(/home/test)1. host server 디렉토리의 uid를 pod와 같이 1000으로 변경# pod에서 1000으로 작업하기 때문에 별도의 작업 필요 없음sudo chown 1000:1001 /home/test2. host server 디렉토리의 gid를 pod와 같이 1000으로 변경# pod에서 gid로 접근하기 때문에 775 권한이 있어야 함sudo chown 1001:1000 /home/testsudo chmod 775 /home/test3. host server의 권한을 바꾸지 않는 경..
2025.02.28 -
StatefulSet에서 hostname의 번호 정보 가져오기: ${HOSTNAME##*-}
##*- removes everything up to and including the last dash (-).yml- name: KAFKA_BROKER_ID value: "$(echo ${HOSTNAME##*-})"commandkubectl exec -it kafka-0 -- sh -c "echo \$HOSTNAME"
2025.02.28 -
Kafka Running in Zookeeper mode...port is deprecated. Please use KAFKA_ADVERTISED_LISTENERS instead.
참조: https://blog.palark.com/recent-troubleshooting-cases-from-our-sres-part-2/ Recent troubleshooting cases from our SREs, part 2Our stories include a poorly prepared Kafka in Docker, an unexpected network issue for ZooKeeper & ClickHouse, a faulty hardware in the data center, and the PgSQL database optimization.blog.palark.com It appears you're encountering issues deploying Kafka within a Kuber..
2025.02.26 -
image 내용 확인 하기
kubectl run test --image=confluentinc/cp-kafka:latest -- tail -f /dev/null
2025.02.26