# kubectl apply -f ./kafka-connect-jdbc.yml

apiVersion: v1
kind: Pod
metadata:
  name: kafkajdbc
  namespace: default
spec:
  volumes:
  - name: connectors
    hostPath:
      path: /var/kafka1/Connectors

  containers:
  - command: ["/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"]
    image: solsson/kafka-connect-jdbc@sha256:b4796349b8078c483d77aa8e1963a5ecca69c049b70fd5e2e1d55a076a6e257c
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: connectors
      mountPath: /opt/kafka/Connectors    
    name: kafka-connect
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    
  - name: debian-network
    command: ["/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"]
    image: astbss/debian-network
    imagePullPolicy: IfNotPresent
    

# kubectl -n kafka get pods
# kubectl -n kafka delete pod kafkajdbc

# kubectl -n kafka exec -it kafkajdbc -- bash 
# kubectl -n kafka exec -it kafkajdbc --container debian-network -- bash 
# kubectl -n kafka exec -it kafkajdbc --container kafka-connect -- bash  

# kubectl exec -it mysql-569c4cc845-5nrjj -- bash  

# - sh
# - -c
# exec /opt/kafka/bin/connect-standalone.sh /opt/kafka/Connectors/kconnect-jdbc.properties /opt/kafka/Connectors/source-mariadb.properties
# exec /opt/kafka/bin/connect-standalone.sh /opt/kafka/Connectors/kconnect-jdbc.properties /opt/kafka/Connectors/source-mariadb-222.properties

