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
# Deprecated in v1.16 in favor of apiextensions.k8s.io/v1
90
94
apiVersion: apiextensions.k8s.io/v1beta1
@@ -129,6 +133,7 @@ spec:
129
133
replicas:
130
134
type: integer
131
135
```
136
+
132
137
{{% /tab %}}
133
138
{{< /tabs >}}
134
139
@@ -188,7 +193,7 @@ kubectl get crontab
188
193
189
194
Should print a list like this:
190
195
191
-
```console
196
+
```none
192
197
NAME AGE
193
198
my-new-cron-object 6s
194
199
```
@@ -205,7 +210,7 @@ kubectl get ct -o yaml
205
210
You should see that it contains the custom `cronSpec` and `image` fields
206
211
from the yaml you used to create it:
207
212
208
-
```console
213
+
```yaml
209
214
apiVersion: v1
210
215
kind: List
211
216
items:
@@ -228,14 +233,14 @@ metadata:
228
233
## Delete a CustomResourceDefinition
229
234
230
235
When you delete a CustomResourceDefinition, the server will uninstall the RESTful API endpoint
231
-
and **delete all custom objects stored in it**.
236
+
and delete all custom objects stored in it.
232
237
233
238
```shell
234
239
kubectl delete -f resourcedefinition.yaml
235
240
kubectl get crontabs
236
241
```
237
242
238
-
```console
243
+
```none
239
244
Error from server (NotFound): Unable to list {"stable.example.com" "v1" "crontabs"}: the server could not find the requested resource (get crontabs.stable.example.com)
240
245
```
241
246
@@ -630,7 +635,9 @@ These fields can only be set with specific features enabled:
630
635
631
636
- `default`: can be set for `apiextensions.k8s.io/v1` CustomResourceDefinitions. Defaulting is in GA since 1.17 (beta since 1.16 with the `CustomResourceDefaulting` feature gate to be enabled, which is the case automatically for many clusters for beta features). Compare [Validation Schema Defaulting](/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/#defaulting).
632
637
633
-
Note: compare with [structural schemas](#specifying-a-structural-schema) for further restriction required for certain CustomResourceDefinition features.
638
+
{{< note >}}
639
+
Compare with [structural schemas](#specifying-a-structural-schema) for further restriction required for certain CustomResourceDefinition features.
640
+
{{< /note >}}
634
641
635
642
The schema is defined in the CustomResourceDefinition. In the following example, the
636
643
CustomResourceDefinition applies the following validations on the custom object:
@@ -642,6 +649,7 @@ Save the CustomResourceDefinition to `resourcedefinition.yaml`:
0 commit comments