You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Managed resource definitions are enabled by default in Crossplane v2.0+. This automatically converts provider CRDs to MRDs during installation. To disable this behavior, set `--enable-custom-to-managed-resource-conversion=false` when installing Crossplane.
10
+
Crossplane v2.0+ enables managed resource definitions by default. This automatically converts provider CRDs to MRDs during installation. To disable this behavior, set `--enable-custom-to-managed-resource-conversion=false` when installing Crossplane.
11
11
{{</hint>}}
12
12
13
-
A `ManagedResourceDefinition` (MRD) is a lightweight abstraction over Kubernetes CustomResourceDefinitions (CRDs) that enables selective activation of managed resources. MRDs solve the problem of providers installing hundreds of CRDs when you only need a few, reducing API server overhead and improving cluster performance.
13
+
A `ManagedResourceDefinition` (MRD) is a lightweight abstraction over Kubernetes CustomResourceDefinitions (CRDs) that enables selective activation of managed resources. MRDs solve the problem of providers installing hundreds of CRDs when you only need some, reducing API server overhead and improving cluster performance.
14
14
15
+
<!-- vale Google.Headings = NO -->
16
+
<!-- vale Microsoft.HeadingAcronyms = NO -->
15
17
## The CRD scaling problem
18
+
<!-- vale Google.Headings = YES -->
19
+
<!-- vale Microsoft.HeadingAcronyms = YES -->
16
20
17
-
Large Crossplane providers can install 100+ managed resource CRDs. Each CRD consumes approximately 3 MiB of API server memory and creates API endpoints that affect cluster performance:
21
+
Large Crossplane providers can install 100+ managed resource CRDs. Each CRD consumes about 3 MiB of API server memory and creates API endpoints that affect cluster performance:
18
22
19
23
-**Memory pressure**: Large providers can consume 300+ MiB of API server memory
20
24
-**Slower kubectl operations**: Commands like `kubectl get managed` must query all custom resource endpoints
@@ -23,7 +27,11 @@ Large Crossplane providers can install 100+ managed resource CRDs. Each CRD cons
23
27
24
28
MRDs address this by allowing providers to ship resource definitions that only become active CRDs when explicitly needed.
25
29
30
+
<!-- vale Google.Headings = NO -->
31
+
<!-- vale Microsoft.HeadingAcronyms = NO -->
26
32
## How MRDs work
33
+
<!-- vale Google.Headings = YES -->
34
+
<!-- vale Microsoft.HeadingAcronyms = YES -->
27
35
28
36
An MRD contains the same schema as a CRD but adds two key fields:
29
37
@@ -76,14 +84,18 @@ spec:
76
84
- **Connection details documentation**: Schema for documenting available connection secrets
77
85
- **One-way state transition**: MRDs can go from `Inactive` to `Active` but not back
78
86
87
+
<!-- vale Google.Headings = NO -->
88
+
<!-- vale Microsoft.HeadingAcronyms = NO -->
79
89
## MRD states
90
+
<!-- vale Google.Headings = YES -->
91
+
<!-- vale Microsoft.HeadingAcronyms = YES -->
80
92
81
93
### Inactive state
82
94
83
95
When `state: Inactive` (the default):
84
96
85
97
- No CRD exists in the cluster
86
-
- No API endpoints are created
98
+
- No API endpoints exist
87
99
- The provider doesn't start a controller for this resource
88
100
- Minimal memory and CPU overhead
89
101
@@ -99,7 +111,7 @@ When `state: Active`:
99
111
- Crossplane creates the corresponding CRD
100
112
- API endpoints become available for the resource
101
113
- The provider starts a controller to manage instances
102
-
- Full functionality like traditional managed resources
114
+
- Full capability like traditional managed resources
103
115
104
116
```yaml
105
117
spec:
@@ -112,7 +124,7 @@ MRD state transitions are one-way only. Once an MRD becomes `Active`, it can't r
112
124
113
125
## Connection details documentation
114
126
115
-
MRDs can document what connection details a managed resource provides. This helps users understand what data will be available in connection secrets without having to create test resources.
127
+
MRDs can document what connection details a managed resource provides. This helps users understand what data is available in connection secrets without having to create test resources.
116
128
117
129
```yaml
118
130
spec:
@@ -128,12 +140,20 @@ spec:
128
140
```
129
141
130
142
{{<hint "note">}}
131
-
Connection details documentation is currently a schema-only feature. Most providers don't yet populate the `connectionDetails` field in their MRDs, but the structure is available for future implementation.
143
+
Connection details documentation is a schema-only feature. Most providers don't populate the `connectionDetails` field in their MRDs, but the structure is available for implementation.
132
144
{{</hint>}}
133
145
146
+
<!-- vale Google.Headings = NO -->
147
+
<!-- vale Microsoft.HeadingAcronyms = NO -->
134
148
## Working with MRDs
149
+
<!-- vale Google.Headings = YES -->
150
+
<!-- vale Microsoft.HeadingAcronyms = YES -->
135
151
152
+
<!-- vale Google.Headings = NO -->
153
+
<!-- vale Microsoft.HeadingAcronyms = NO -->
136
154
### Viewing MRDs
155
+
<!-- vale Google.Headings = YES -->
156
+
<!-- vale Microsoft.HeadingAcronyms = YES -->
137
157
138
158
List all MRDs in your cluster:
139
159
@@ -147,7 +167,11 @@ View MRD details:
147
167
kubectl describe mrd buckets.s3.aws.crossplane.io
148
168
```
149
169
170
+
<!-- vale Google.Headings = NO -->
171
+
<!-- vale Microsoft.HeadingAcronyms = NO -->
150
172
### Checking MRD status
173
+
<!-- vale Google.Headings = YES -->
174
+
<!-- vale Microsoft.HeadingAcronyms = YES -->
151
175
152
176
MRDs provide status information about their lifecycle:
153
177
@@ -163,30 +187,34 @@ status:
163
187
**Status conditions:**
164
188
165
189
- **`Established: False, Reason: InactiveManagedResource`**: MRD is inactive, no CRD created
166
-
- **`Established: Unknown, Reason: PendingManagedResource`**: CRD is being created
190
+
- **`Established: Unknown, Reason: PendingManagedResource`**: CRD is under creation
167
191
- **`Established: True, Reason: EstablishedManagedResource`**: CRD exists and is ready
However, the recommended approach is to use [ManagedResourceActivationPolicies]({{<ref "managed-resource-activation-policies">}}) for systematic activation.
207
+
The recommended approach is to use [ManagedResourceActivationPolicies]({{<ref "managed-resource-activation-policies">}}) for systematic activation.
180
208
181
209
## How providers work with MRDs
182
210
183
211
Crossplane v2.0+ automatically converts all provider CRDs to MRDs during package installation, regardless of the provider's age or original format. The provider's `safe-start` capability determines the default MRD state:
184
212
185
213
### Providers with `safe-start` capability
186
-
- MRDs are created with `state: Inactive` by default
214
+
- MRDs start with `state: Inactive` by default
187
215
- Support selective activation via [ManagedResourceActivationPolicies]({{<ref "managed-resource-activation-policies">}})
188
216
- Reduced resource overhead for unused resources
189
-
- Provider can safely start without all CRDs being active
217
+
- Provider can start without all CRDs being active
190
218
191
219
```yaml
192
220
# Provider package metadata
@@ -202,20 +230,30 @@ Crossplane uses fuzzy matching for capabilities, so `safe-start`, `safe_start`,
202
230
{{</hint>}}
203
231
204
232
### Providers without `safe-start` capability
205
-
- MRDs are created with `state: Active` by default (legacy behavior)
206
-
- All CRDs are created immediately for backward compatibility
233
+
- MRDs start with `state: Active` by default (legacy behavior)
234
+
- All CRDs become available for backward compatibility
207
235
- Full resource overhead like traditional providers
208
236
209
237
238
+
<!-- vale Google.Headings = NO -->
239
+
<!-- vale Microsoft.HeadingAcronyms = NO -->
210
240
## Troubleshooting MRDs
241
+
<!-- vale Google.Headings = YES -->
242
+
<!-- vale Microsoft.HeadingAcronyms = YES -->
211
243
244
+
<!-- vale Google.Headings = NO -->
245
+
<!-- vale Microsoft.HeadingAcronyms = NO -->
212
246
### MRD exists but no CRD appears
247
+
<!-- vale Google.Headings = YES -->
248
+
<!-- vale Microsoft.HeadingAcronyms = YES -->
213
249
250
+
<!-- vale Google.Colons = NO -->
214
251
**Symptoms**: MRD is present but `kubectl get <resource>` shows "no resources found"
215
252
216
253
**Cause**: MRD is in `Inactive` state
217
254
218
255
**Solution**: Activate the MRD using an [ManagedResourceActivationPolicy]({{<ref "managed-resource-activation-policies">}}) or manually patch the state
256
+
<!-- vale Google.Colons = YES -->
219
257
220
258
```shell
221
259
# Check MRD state
@@ -225,21 +263,27 @@ kubectl get mrd <name> -o jsonpath='{.spec.state}'
0 commit comments