Skip to content

Commit b196e7f

Browse files
committed
OSS Istio migration docs
1 parent 04b275f commit b196e7f

File tree

5 files changed

+356
-8
lines changed

5 files changed

+356
-8
lines changed

content/docs/_index.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,14 @@ a dynamic reconfiguration.
126126

127127
### Seamless Istio mesh support
128128

129-
- Operator allows to use ClusterIP services instead of Headless, which still works better in case of Service meshes.
130-
- To avoid too early Kafka initialization, which might lead to unready sidecar container. The operator uses a small script to mitigate this behavior. Any Kafka image can be used with the only requirement of an available **curl** command.
131-
- To access a Kafka cluster which runs inside the mesh. Operator supports creating Istio ingress gateways.
129+
- **Standard Istio Integration**: Koperator now uses standard Istio resources (Gateway, VirtualService) instead of deprecated banzaicloud istio-operator
130+
- **Flexible Deployment**: Works with any Istio installation method (operator, Helm, or manual)
131+
- **Service Mesh Ready**: Operator allows to use ClusterIP services instead of Headless, which works better with Service meshes
132+
- **Sidecar Compatibility**: To avoid too early Kafka initialization, the operator uses a small script to mitigate sidecar container readiness issues
133+
- **Istio Ingress Gateways**: Operator supports creating Istio ingress gateways for external access to Kafka clusters running inside the mesh
134+
- **No Control Plane Dependency**: Works with any Istio installation without requiring specific control plane configuration
135+
136+
For detailed Istio integration configuration, troubleshooting, and migration guides, see the [Istio Integration Guide]({{< relref "istio-integration.md" >}}).
132137

133138
---
134139
Apache Kafka, Kafka, and the Kafka logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.

content/docs/configurations/examples/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ You can create a broker-ingress mapping to eliminate traffic across availability
5454

5555
## Kafka cluster with Istio
5656

57-
You can use Istio as the ingress controller for your external listeners. It requires using our [Istio operator](https://github.com/banzaicloud/istio-operator) in the Kubernetes cluster.
57+
You can use Istio as the ingress controller for your external listeners. Koperator now uses standard Istio resources (Gateway, VirtualService) instead of the deprecated banzaicloud istio-operator, providing better compatibility and working with any Istio installation.
5858

5959
- [Kafka cluster with Istio as ingress controller](https://github.com/adobe/koperator/blob/master/config/samples/kafkacluster-with-istio.yaml)
6060

content/docs/developer.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,35 @@ Create CR and let the operator set up Kafka in your cluster (you can change the
4545
4646
`kubectl create -n kafka -f config/samples/simplekafkacluster.yaml`
4747

48+
## Istio Integration
49+
50+
Koperator now supports Istio integration using standard Istio resources instead of the deprecated banzaicloud istio-operator. This provides better compatibility and works with any Istio installation.
51+
52+
### Prerequisites for Istio Integration
53+
54+
1. Install Istio in your cluster (any method - operator, Helm, or manual)
55+
2. Ensure Istio CRDs are available
56+
3. Configure the `istioIngressConfig` section in your KafkaCluster spec
57+
58+
### Example Istio Configuration
59+
60+
```yaml
61+
apiVersion: kafka.banzaicloud.io/v1beta1
62+
kind: KafkaCluster
63+
metadata:
64+
name: kafka
65+
spec:
66+
ingressController: "istioingress"
67+
istioIngressConfig:
68+
gatewayConfig:
69+
mode: ISTIO_MUTUAL
70+
# ... rest of your configuration
71+
```
72+
73+
**Note**: The `istioControlPlane` configuration is no longer required. Koperator creates standard Kubernetes Deployment and Service resources along with Istio Gateway and VirtualService resources.
74+
75+
For comprehensive Istio integration documentation including advanced configuration, troubleshooting, and migration guides, see the [Istio Integration Guide]({{< relref "istio-integration.md" >}}).
76+
4877
## Limitations on minikube
4978

5079
Minikube does not have a load balancer implementation, thus our envoy service will not get an external IP and the operator will get stuck at this point.

content/docs/external-listener/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,18 @@ To configure an external listener that uses the LoadBalancer access method, comp
107107
ingressController: "envoy"
108108
```
109109

110-
- To use Istio ingress controller set the `ingressController` field to `istioingress`. [Istio operator](https://github.com/banzaicloud/istio-operator) v2 is supported from Koperator version 0.21.0+. Istio operator v2 supports multiple Istio control plane on the same cluster, that is why the corresponding control plane to the gateway must be specified. The `istioControlPlane` field in the `KafkaCluster` custom resource is a reference to that IstioControlPlane resource. For an example, [see](https://github.com/adobe/koperator/blob/672b19d49e5c0a22f9658181003beddb56f17d33/config/samples/kafkacluster-with-istio.yaml#L10).
110+
- To use Istio ingress controller set the `ingressController` field to `istioingress`. Koperator now uses standard Istio resources (Gateway, VirtualService) instead of the deprecated banzaicloud istio-operator. This provides better compatibility and works with any Istio installation. The `istioControlPlane` configuration is no longer required.
111111

112112
```yaml
113113
spec:
114114
ingressController: "istioingress"
115-
istioControlPlane:
116-
name: <name of the IstioControlPlane custom resource>
117-
namespace: <namespace of the IstioControlPlane custom resource>
115+
istioIngressConfig:
116+
gatewayConfig:
117+
mode: ISTIO_MUTUAL # or SIMPLE for non-mTLS
118118
```
119119

120+
For detailed Istio integration configuration and advanced features, see the [Istio Integration Guide]({{< relref "../istio-integration.md" >}}).
121+
120122
1. Configure additional parameters for the ingress controller as needed for your environment, for example, number of replicas, resource requirements and resource limits. You can be configure such parameters using the *envoyConfig* and *istioIngressConfig* fields, respectively.
121123
1. (Optional) For external access through a static URL instead of the load balancer's public IP, specify the URL in the `hostnameOverride` field of the external listener that resolves to the public IP of the load balancer. The broker address will be advertised as, `advertised.listeners=EXTERNAL1://kafka-1.dev.my.domain:<broker port number>`.
122124

content/docs/istio-integration.md

Lines changed: 312 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,312 @@
1+
---
2+
title: Istio Integration
3+
weight: 200
4+
---
5+
6+
# Istio Integration with Koperator
7+
8+
Koperator now supports Istio integration using standard Istio resources, providing advanced service mesh capabilities for Kafka clusters. This integration replaces the deprecated banzaicloud istio-operator with a more robust approach using standard Kubernetes and Istio resources.
9+
10+
## Overview
11+
12+
The Istio integration in Koperator provides:
13+
14+
- **Service Mesh Capabilities**: Full Istio service mesh integration for Kafka clusters
15+
- **Traffic Management**: Advanced traffic routing and load balancing
16+
- **Security**: mTLS encryption and authentication
17+
- **Observability**: Enhanced monitoring and tracing capabilities
18+
- **Gateway Management**: Automatic Istio Gateway and VirtualService creation
19+
- **No Control Plane Dependency**: Works with any Istio installation
20+
21+
## Prerequisites
22+
23+
Before using Istio integration with Koperator, ensure you have:
24+
25+
1. **Istio Installation**: Any Istio installation (operator-based or manual)
26+
2. **Kubernetes Cluster**: Version 1.19+ with sufficient resources
27+
3. **Istio CRDs**: Istio Custom Resource Definitions installed
28+
29+
## Installation
30+
31+
### 1. Install Istio (Optional)
32+
33+
If you don't have Istio installed, you can install it using any method:
34+
35+
```bash
36+
# Option 1: Using Istio operator
37+
kubectl apply -f https://github.com/istio/istio/releases/download/1.19.0/istio-1.19.0-linux-amd64.tar.gz
38+
istioctl install --set values.defaultRevision=default
39+
40+
# Option 2: Using Helm
41+
helm repo add istio https://istio-release.storage.googleapis.com/charts
42+
helm repo update
43+
helm install istio-base istio/base -n istio-system --create-namespace
44+
helm install istiod istio/istiod -n istio-system --wait
45+
```
46+
47+
### 2. Verify Istio Installation
48+
49+
```bash
50+
# Check Istio control plane status (if installed)
51+
kubectl get pods -n istio-system
52+
53+
# Verify Istio CRDs are available
54+
kubectl get crd | grep istio
55+
```
56+
57+
## Configuration
58+
59+
### Basic Istio Configuration
60+
61+
Configure your KafkaCluster to use Istio ingress:
62+
63+
```yaml
64+
apiVersion: kafka.banzaicloud.io/v1beta1
65+
kind: KafkaCluster
66+
metadata:
67+
name: kafka
68+
namespace: kafka
69+
spec:
70+
ingressController: "istioingress"
71+
istioIngressConfig:
72+
gatewayConfig:
73+
mode: ISTIO_MUTUAL
74+
# ... rest of your Kafka configuration
75+
```
76+
77+
**Note**: The `istioControlPlane` configuration is no longer required as Koperator now creates standard Kubernetes resources that work with any Istio installation.
78+
79+
### Advanced Configuration Options
80+
81+
#### Istio Ingress Configuration
82+
83+
```yaml
84+
spec:
85+
istioIngressConfig:
86+
# Gateway configuration
87+
gatewayConfig:
88+
mode: ISTIO_MUTUAL # or SIMPLE for non-mTLS
89+
90+
# Resource limits and requests
91+
resources:
92+
requests:
93+
cpu: "100m"
94+
memory: "128Mi"
95+
limits:
96+
cpu: "2000m"
97+
memory: "1024Mi"
98+
99+
# Replica configuration
100+
replicas: 2
101+
102+
# Node selector for gateway placement
103+
nodeSelector:
104+
kubernetes.io/os: linux
105+
106+
# Tolerations for gateway scheduling
107+
tolerations:
108+
- key: "istio"
109+
operator: "Equal"
110+
value: "true"
111+
effect: "NoSchedule"
112+
113+
# Environment variables
114+
envs:
115+
- name: CUSTOM_VAR
116+
value: "custom-value"
117+
118+
# Annotations for the gateway
119+
annotations:
120+
custom.annotation: "value"
121+
122+
# Service annotations
123+
serviceAnnotations:
124+
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
125+
```
126+
127+
## Architecture Changes
128+
129+
### Previous Architecture (banzaicloud istio-operator)
130+
131+
The previous implementation used:
132+
- `IstioMeshGateway` custom resources
133+
- banzaicloud istio-operator dependencies
134+
- Custom Istio operator APIs
135+
136+
### New Architecture (Standard Istio Resources)
137+
138+
The new implementation uses:
139+
- Standard Kubernetes `Deployment` and `Service` resources
140+
- Native Istio `Gateway` and `VirtualService` resources
141+
- No dependency on specific Istio control plane or operator
142+
143+
### Resource Creation
144+
145+
When you create a KafkaCluster with Istio integration, Koperator automatically creates:
146+
147+
1. **Kubernetes Deployment**: Istio proxy deployment with `docker.io/istio/proxyv2:latest` image
148+
2. **Kubernetes Service**: Load balancer service for external access
149+
3. **Istio Gateway**: Routes external traffic to Kafka brokers
150+
4. **VirtualService**: Defines routing rules for the gateway
151+
152+
The implementation creates standard Kubernetes resources that work with any Istio installation, making it more flexible and compatible.
153+
154+
## Security Features
155+
156+
### mTLS Configuration
157+
158+
The Istio integration supports mutual TLS (mTLS) for secure communication:
159+
160+
```yaml
161+
spec:
162+
istioIngressConfig:
163+
gatewayConfig:
164+
mode: ISTIO_MUTUAL # Enables mTLS
165+
```
166+
167+
### Authentication and Authorization
168+
169+
Istio provides additional security features:
170+
- **PeerAuthentication**: Configure mTLS policies
171+
- **AuthorizationPolicy**: Define access control rules
172+
- **RequestAuthentication**: JWT token validation
173+
174+
## Monitoring and Observability
175+
176+
### Metrics
177+
178+
Istio integration provides enhanced metrics:
179+
- **Traffic Metrics**: Request rates, latency, error rates
180+
- **Gateway Metrics**: Istio gateway performance
181+
- **Service Mesh Metrics**: End-to-end observability
182+
183+
### Tracing
184+
185+
Distributed tracing is automatically enabled:
186+
- **Jaeger Integration**: Automatic trace collection
187+
- **Zipkin Support**: Alternative tracing backend
188+
- **Custom Trace Sampling**: Configurable sampling rates
189+
190+
## Troubleshooting
191+
192+
### Common Issues
193+
194+
1. **Istio Control Plane Not Found**
195+
```bash
196+
# Verify Istio control plane is running
197+
kubectl get pods -n istio-system
198+
```
199+
200+
2. **Gateway Not Receiving Traffic**
201+
```bash
202+
# Check gateway status
203+
kubectl get gateway -n kafka
204+
kubectl describe gateway kafka-gateway -n kafka
205+
```
206+
207+
3. **mTLS Configuration Issues**
208+
```bash
209+
# Verify peer authentication
210+
kubectl get peerauthentication -n kafka
211+
```
212+
213+
### Debugging Commands
214+
215+
```bash
216+
# Check Istio proxy status
217+
istioctl proxy-status
218+
219+
# Verify configuration
220+
istioctl analyze
221+
222+
# Check gateway configuration
223+
kubectl get gateway,virtualservice -n kafka
224+
225+
# View Istio logs
226+
kubectl logs -n kafka -l app=istio-ingressgateway
227+
```
228+
229+
## Migration from banzaicloud istio-operator
230+
231+
If you're migrating from the deprecated banzaicloud istio-operator:
232+
233+
1. **Remove old dependencies**: Uninstall banzaicloud istio-operator
234+
2. **Install upstream Istio**: Follow the installation steps above
235+
3. **Update configurations**: Update your KafkaCluster specs
236+
4. **Test thoroughly**: Verify all functionality works as expected
237+
238+
## Best Practices
239+
240+
1. **Resource Planning**: Allocate sufficient resources for Istio components
241+
2. **Security**: Always use mTLS in production environments
242+
3. **Monitoring**: Set up comprehensive monitoring and alerting
243+
4. **Testing**: Thoroughly test Istio configurations in non-production environments
244+
5. **Updates**: Keep Istio and Koperator versions compatible
245+
246+
## Examples
247+
248+
### Complete KafkaCluster with Istio
249+
250+
```yaml
251+
apiVersion: kafka.banzaicloud.io/v1beta1
252+
kind: KafkaCluster
253+
metadata:
254+
name: kafka
255+
namespace: kafka
256+
spec:
257+
headlessServiceEnabled: false
258+
ingressController: "istioingress"
259+
istioIngressConfig:
260+
gatewayConfig:
261+
mode: ISTIO_MUTUAL
262+
resources:
263+
requests:
264+
cpu: "100m"
265+
memory: "128Mi"
266+
limits:
267+
cpu: "2000m"
268+
memory: "1024Mi"
269+
replicas: 2
270+
annotations:
271+
sidecar.istio.io/inject: "true"
272+
zkAddresses:
273+
- "zookeeper-server-client.zookeeper:2181"
274+
clusterImage: "ghcr.io/adobe/koperator/kafka:2.13-3.9.1"
275+
brokers:
276+
- id: 0
277+
brokerConfigGroup: "default"
278+
- id: 1
279+
brokerConfigGroup: "default"
280+
- id: 2
281+
brokerConfigGroup: "default"
282+
brokerConfigGroups:
283+
default:
284+
storageConfigs:
285+
- mountPath: "/kafka-logs"
286+
pvcSpec:
287+
accessModes:
288+
- ReadWriteOnce
289+
resources:
290+
requests:
291+
storage: 10Gi
292+
listenersConfig:
293+
internalListeners:
294+
- type: "plaintext"
295+
name: "internal"
296+
containerPort: 29092
297+
usedForInnerBrokerCommunication: true
298+
externalListeners:
299+
- type: "plaintext"
300+
name: "external"
301+
externalStartingPort: 19090
302+
containerPort: 9094
303+
```
304+
305+
## Support
306+
307+
For issues related to Istio integration:
308+
309+
1. **Koperator Issues**: Report to the Koperator GitHub repository
310+
2. **Istio Issues**: Report to the Istio GitHub repository
311+
3. **Documentation**: Check the official Istio documentation
312+
4. **Community**: Join the Istio and Koperator community discussions

0 commit comments

Comments
 (0)