Kubernetes Custom Resources for Confluent Platform

Confluent Platform components are deployed to a Kubernetes cluster as custom resources (CRs). Confluent for Kubernetes creates custom resource definitions (CRDs) via Kubernetes API, and the CRDs describe how to configure Confluent Platform components. The CRDs are provided in the yaml files in the Confluent for Kubernetes distribution.

Use kubectl to examine Confluent Platform CRDs

The kubectl explain command describes the fields associated with Kubernetes API resources, including Confluent Platform CRDs.

  1. To get a list of Confluent Platform CRDs:

    kubectl api-resources --api-group=platform.confluent.io
    
  2. To describe a specific Confluent Platform CRD:

    kubectl explain <CRD-type>.<fieldName>[.<fieldName>]
    

    You can drill down the CRD specification by appending a <fieldName> from the kubctl explain output.

    For example:

    kubectl explain kafka.spec.podTemplate
    

    And to further examine the affinity field listed in the output:

    kubectl explain kafka.spec.podTemplate.affinity
    

Confluent plugin

Confluent plugin is a composite CLI tool integrated with the Kubernetes ecosystem through the kubectl plugin interface. You can use the plugin to debug and diagnose your Confluent Platform deployed through Confluent for Kubernetes.

See Install Confluent plugin for installation instructions.

Use the following command to get the comprehensive usage instruction:

kubectl confluent

The following are some of the example commands:

  • To see all of the external and internal endpoints that you can use to access Confluent components:

    kubectl confluent http-endpoints
    
  • To convert Operator 1.x to CFK 2.0:

    kubectl confluent migration
    
  • To check if the current user has cluster-level access:

    kubectl confluent operator --namespaced=false pre-check
    
  • To check if the current user has the namespaced level access:

    kubectl confluent operator pre-check