helm upgrade --install kong-operator kong/kong-operator -n kong-system \
--create-namespace \
--set image.tag=2.1 \
--set env.ENABLE_CONTROLLER_KONNECT=true \
-f values.yaml
Enable debug logging
Configure the zap-log-level and zap-devel environment variables via Helm values.
Enable debug logging
When installing or upgrading Kong Operator with Helm, you can enable debug logging by adding the following to your values.yaml:
cat <<EOF > values.yaml
env:
zap_log_level: debug
zap_devel: "true"
zap_time_encoding: iso8601
EOF
For more details about these options, see Kong Operator configuration options.
Install Kong Operator
Run the following command to install Kong Operator using the values.yaml file we created:
helm upgrade --install kong-operator kong/kong-operator -n kong-system \
--create-namespace \
--set image.tag=2.1 \
-f values.yaml
Validate
Use the following command to display the Kong Operator logs:
kubectl logs -n kong-system deployment/kong-operator-kong-operator-controller-manager -f
You should see logs with the DEBUG level.
Development mode (
--zap-devel=true) uses a console encoder with colored, human-readable output. Production mode uses JSON encoding suitable for log aggregation systems.
FAQs
How can I disable debug logging?
To return to normal logging levels, remove the debug configuration and upgrade:
helm upgrade kong-operator kong/kong-operator \
-n kong-system \
--reset-values
Can I used arguments instead of environment variables to enable debug logging?
Yes, you can configure logging using flags in your values.yaml:
args:
- --zap-log-level=debug
- --zap-devel=true
- --zap-time-encoding=iso8601
The env and args sections are mutually exclusive. When both are provided, args takes precedence.