Migrate from Kubernetes credentials API to Settings API
The Kubernetes credentials API has been deprecated with Dynatrace version 1.288. It is replaced by the Settings API
with the Kubernetes connection settings (builtin:cloud.kubernetes
) and
the Kubernetes monitoring settings (builtin:cloud.kubernetes.monitoring
)
schemas. We recommend that you migrate to the new API at your earliest convenience.
The migration affects endpoint URLs, query parameters, and response/request body parameters, as well as the scope of the token for the request.
Base URL
new Settings 2.0 | old Kubernetes credentials |
---|---|
/api/v2/settings | /config/v1/kubernetes/credentials |
Authentication token scope
new Settings 2.0 | old Kubernetes credentials |
---|---|
Read settings (settings.read )Write settings ( settings.write ) | Read configuration (ReadConfig )Write configuration ( WriteConfig ) |
Parameters
To learn about new query/body parameters, see the documentation of individual requests in the Settings API.
In the Settings 2.0 framework, Kubernetes monitoring is configured via settings objects. A settings object contains some metadata (like the scope or creation timestamp) and the configuration itself, encapsulated in the value object.
For configuring Kubernetes cluster monitoring, two settings schemas are important:
- Kubernetes connection settings (
builtin:cloud.kubernetes
) for configuring how the ActiveGate accesses the Kubernetes cluster, and - Kubernetes monitoring settings (
builtin:cloud.kubernetes.monitoring
) for configuring what the ActiveGate should monitor.
This is in contrast to the Kubernetes credentials API, where one credentials object held information about both the connection and the monitoring features.
The advantage of having these settings separated is that you can define default Kubernetes monitoring settings on the environment level, which configure monitoring for all Kubernetes clusters, unless specifically overridden on cluster level. Learn more about monitoring settings on environment level and cluster level and how you can make use of settings hierarchies and overrides here: Global default monitoring settings for Kubernetes/OpenShift.
To learn about the parameters of Kubernetes connection settings, query the Kubernetes (builtin:cloud.kubernetes
) schema with
the GET a schema request.
To learn about the parameters of Kubernetes monitoring settings, query the Kubernetes monitoring (builtin:cloud.kubernetes.monitoring
) schema with the GET a schema request.
new Settings 2.0 schema | new Parameter in Settings 2.0 | old Parameter in Kubernetes credentials |
---|---|---|
Connection settings | enabled | active |
Connection settings | label | label |
Connection settings | endpointUrl | endpointUrl |
Connection settings | authToken | authToken |
Connection settings | activeGateGroup | activeGateGroup |
Connection settings | certificateCheckEnabled | certificateCheckEnabled |
Connection settings | hostnameVerificationEnabled | hostnameVerificationEnabled |
Connection settings | clusterIdEnabled | - not supported |
Connection settings | clusterId | - not supported |
Monitoring settings | cloudApplicationPipelineEnabled | workloadIntegrationEnabled |
Monitoring settings | openMetricsPipelineEnabled | prometheusExportersIntegrationEnabled |
Monitoring settings | eventProcessingActive | eventsIntegrationEnabled |
Monitoring settings | includeAllFdiEvents | davisEventsIntegrationEnabled |
Monitoring settings | filterEvents | - not needed |
Monitoring settings | eventPatterns | eventsFieldSelectors |
Monitoring settings | openMetricsBuiltinEnabled | - not supported |
Monitoring settings | pvcMonitoringEnabled | - not supported |
- | - | eventAnalysisAndAlertingEnabled (deprecated) |
- | - not supported | endpointStatus |
- | - not supported | endpointStatusInfo |
- | - not supported | metadata |
- | - part of the URL | id |
Check the examples below to see the differences between using the Kubernetes credentials API and the Settings API.
Examples
Here are some examples of differences in API usage.
List all Kubernetes connection settings
Details for a specific Kubernetes connection
Validate creation of a Kubernetes connection
In this example, we validate if the request for creating a new Kubernetes connection would be successful.
Create a Kubernetes connection
In this example, we create a Kubernetes connection. Keep in mind that the recommended way is to use the Dynatrace Operator as explained here: Deployment
Edit a Kubernetes connection
In this example, we modify the Kubernetes connection created in the previous example. We change the name to old-test-cluster
.
Delete a Kubernetes connection
In this example, we delete the previously created Kubernetes connection again.