此内容没有您所选择的语言版本。

Chapter 5. Operating a proxy


Monitor the operational status of the proxy and configure resource usage. This section explains how to check the status of the KafkaProxyIngress and VirtualKafkaCluster resources, and how to set CPU and memory requests and limits for the proxy container.

This section assumes you have a running Streams for Apache Kafka Proxy instance.

The status of a VirtualKafkaCluster resource provides feedback on its configuration through a set of conditions. These include the ResolvedRefs condition, which indicates whether all referenced resources exist, and the Accepted condition, which indicates whether the cluster’s configuration was successfully applied to the proxy.

5.1.1. ResolvedRefs conditions

When you create a VirtualKafkaCluster, the operator checks whether the following exist:

  • A KafkaProxy matching spec.proxyRef.
  • Each KafkaProxyIngress specified in spec.ingresses, and whether they refer to the same KafkaProxy as the virtual cluster.
  • A Secret referred to in the tls property.

The result is reported in status.conditions with a ResolvedRefs condition accordingly.

Example VirtualKafkaCluster status when all referenced resources exist

kind: VirtualKafkaCluster
apiVersion: kroxylicious.io/v1alpha1
metadata:
  # ...
  generation: 12
spec:
  # ...
status:
  observedGeneration: 12 
1

  conditions:
    - type: ResolvedRefs 
2

      status: True 
3

      observedGeneration: 12
Copy to Clipboard Toggle word wrap

1
The observedGeneration in the status matches the metadata.generation, indicating that the status is up-to-date for the latest spec.
2
The ResolvedRefs condition type reports any issues with referenced resources.
3
A status value of True means that all referenced resources exist.

A status value of False means that one or more of the referenced resources is missing. In this case, the condition includes reason and message properties with more details.

5.1.2. Accepted conditions

When a VirtualKafkaCluster has a valid spec, the operator attempts to configure the proxy instance accordingly. This might not be possible. For example, the spec may be valid but incompatible with other virtual clusters running in the same proxy instance.

The operator sets a condition type of Accepted in status.conditions to indicate whether or not a virtual cluster has been successfully configured within a proxy instance.

5.2. Checking the status of the KafkaProxyIngress resource

The status of a KafkaProxyIngress resource provides feedback on its configuration through a set of conditions. These include the ResolvedRefs condition, which indicates whether all referenced resources exist.

When you create a KafkaProxyIngress, the operator checks whether a KafkaProxy corresponding to the spec.proxyRef exists. The result is reported in status.conditions with a ResolvedRefs condition accordingly.

Example KafkaProxyIngress status when spec.proxyRef exists

kind: KafkaProxyIngress
apiVersion: kroxylicious.io/v1alpha1
metadata:
  name: cluster-ip
  namespace: my-proxy
  generation: 12
spec:
  # ...
status:
  observedGeneration: 12 
1

  conditions:
    - type: ResolvedRefs 
2

      status: True 
3

      observedGeneration: 12
Copy to Clipboard Toggle word wrap

1
The observedGeneration in the status matches the metadata.generation, indicating that the status is up-to-date for the latest spec.
2
The ResolvedRefs condition type reports any issues with referenced resources.
3
A status value of True means that all referenced resources exist.

A status value of False means that the KafkaProxy resource is missing. In this case, the condition includes reason and message properties with more details.

When you define a KafkaProxy resource, a number of OpenShift Pods are created, each with a proxy container. Each of these containers runs a single Streams for Apache Kafka Proxy process.

By default, these proxy containers are defined without resource limits. To manage CPU and memory consumption in your environment, modify the proxyContainer section within your KafkaProxy specification.

Example KafkaProxy configuration with proxy container resource specification

kind: KafkaProxy
apiVersion: kroxylicious.io/v1alpha1
metadata:
  namespace: my-proxy
  name: simple
spec:
  infrastructure:
    proxyContainer:
      resources:
        requests:
          cpu: '400m'
          memory: '656Mi'
        limits:
          cpu: '500m'
          memory: '756Mi'
Copy to Clipboard Toggle word wrap

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部