Configure proxy
As part of getting started with Kubernetes monitoring, you might want to configure a proxy.
You can configure optional parameters like proxy settings in the DynaKube custom resource file in order to:
- Download the OneAgent installer
- Ensure communication between the OneAgent and your Dynatrace environment
- Ensure communication between Dynatrace Operator and the Dynatrace API
There are two ways to provide the proxy, depending on whether your proxy uses credentials.
If you have a proxy that doesn't use credentials, enter your proxy URL directly in the value
field for the proxy.
apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
spec:
apiUrl: https://environmentid.live.dynatrace.com/api
proxy:
value: http://mysuperproxy
If your proxy uses credentials
-
Create a secret with a field called
proxy
that holds your encrypted proxy URL with the credentials.kubectl -n dynatrace create secret generic myproxysecret --from-literal="proxy=http://<user>:<password>@<IP>:<PORT>"
oc -n dynatrace create secret generic myproxysecret --from-literal="proxy=http://<user>:<password>@<IP>:<PORT>"
-
Provide the name of the secret in the
valueFrom
section.apiVersion: dynatrace.com/v1beta1 kind: DynaKube metadata: name: dynakube namespace: dynatrace spec: apiUrl: https://environmentid.live.dynatrace.com/api proxy: valueFrom: myproxysecret