How to install Confluent for Kubernetes?

It is my first time working with Kafka and I need to work with Schema Registry.
I already tested and could send messages from a producer to a consumer.
Now I am trying to install the Schema Registry, but I still can’t.

In minikube I have some pods related to my-schema-registry-cp-schema-registry and a service my-schema-registry-cp-schema-registry
I added helm confluent with:

 helm repo add confluentinc https://packages.confluent.io/helm 

and install confluent with:

helm upgrade --install confluent-operator confluentinc/confluent-for-kubernetes --namespace default

Configure the Schema registry:

helm upgrade --install confluent-operator confluentinc/confluent-for-kubernetes --namespace default --set kafka.bootstrapServers=my-cluster-kafka-bootstrap:9092 --set schemaRegistry.enabled=true

I created a small AVRO file:

{
  "type": "record",
  "name": "MyAvroRecord",
  "fields": [
    {"name": "value", "type": "string"}
  ]
}

Then I move to the cp-helm-charts/charts/cp-schema-registry folder and do:

helm install my-schema-registry . -f values.yaml --namespace default

And I understand that then I have to register the schema in the Schema Registry by doing:

curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
--data '{"schema": "{\"type\":\"record\",\"name\":\"MyAvroRecord\",\"fields\":[{\"name\":\"value\",\"type\":\"string\"}]}"}' \
http://my-schema-registry-cp-schema-registry:8081/subjects/test-topic-value/versions

And here is where I got an error and can’t move forward.

curl: (6) Could not resolve host: my-schema-registry-cp-schema-registry

I was working with chatGPT because I couldn’t find a tutorial or an explanation explaining which steps I should follow to work with Confluent for Kubernetes and Schema Registry.

Hey @nicobonder

I assume you’re trying to setup you env with the helm charts here?

seems as you mixing things up a bit.

I would highly recommend to go with these examples here

hth,
michael

@mmuehlbeyer Hi, as you can see in the first link says cp-helm-charts was deprecated and both links talk about Confluent for Kubernetes, and I don’t have a problem installing CFK, but I have a problem installing and using Schema Registry.
Do you have any examples of how to work with Schema Registry?

Thanks for your reply.
Nico

sure
have look at

it states how to deploy platform including Schema Registry

and the docs

hth,
michael