Deploy TiCDC in Kubernetes

    You can deploy TiCDC when deploying a new TiDB cluster, or add the TiCDC component to an existing TiDB cluster.

    TiDB Operator is deployed.

    To deploy TiCDC when deploying the TiDB cluster, refer to .

    1. Edit Custom Resource:

      1. spec:
      2. ticdc:
      3. baseImage: pingcap/ticdc
      4. replicas: 3

      To deploy Enterprise Edition of TiCDC, edit the db.yaml file to set spec.ticdc.baseImage to the enterprise image (pingcap/ticdc-enterprise).

      For example:

    2. Manage the cluster and data replication tasks by using cdc cli.

      1. [
      2. {
      3. "id": "3ed24f6c-22cf-446f-9fe0-bf4a66d00f5b",
      4. "is-owner": false,
      5. "address": "${cluster_name}-ticdc-2.${cluster_name}-ticdc-peer.${namespace}.svc:8301"
      6. },
      7. "is-owner": false,
      8. "address": "${cluster_name}-ticdc-0.${cluster_name}-ticdc-peer.${namespace}.svc:8301"
      9. },
      10. {
      11. "id": "dc3592c0-dace-42a0-8afc-fb8506e8271c",
      12. "is-owner": true,
      13. "address": "${cluster_name}-ticdc-1.${cluster_name}-ticdc-peer.${namespace}.svc:8301"
      14. }

      Starting from v4.0.3, TiCDC supports TLS. TiDB Operator supports enabling TLS for TiCDC since v1.1.3.

      If TLS is enabled when you create the TiDB cluster, add TLS certificate-related parameters when you use cdc cli.

      If the server does not have an external network, refer to to download the required Docker image on the machine with an external network and upload it to the server.