4
What are the properties given to the CRD’s called collectors.monitoring.controller?

정답
image,replicas, name
풀이
controlplane ~ ➜ kubectl describe crd collectors.monitoring.controller
Name: collectors.monitoring.controller
Namespace:
Labels: <none>
Annotations: <none>
API Version: apiextensions.k8s.io/v1
Kind: CustomResourceDefinition
Metadata:
Creation Timestamp: 2025-01-29T12:29:36Z
Generation: 1
Resource Version: 620
UID: 9a2e0427-766b-4e9a-877d-57ca6cb21c2e
Spec:
Conversion:
Strategy: None
Group: monitoring.controller
Names:
Kind: Collector
List Kind: CollectorList
Plural: collectors
Short Names:
collect
Singular: collector
Scope: Namespaced
Versions:
Name: v1
Schema:
openAPIV3Schema:
Properties:
Spec:
Properties:
Image:
Type: string
Name:
Type: string
Replicas:
Type: integer
Type: object
Type: object
Served: true
Storage: true
Status:
Accepted Names:
Kind: Collector
List Kind: CollectorList
Plural: collectors
Short Names:
collect
Singular: collector
Conditions:
Last Transition Time: 2025-01-29T12:29:36Z
Message: no conflicts found
Reason: NoConflicts
Status: True
Type: NamesAccepted
Last Transition Time: 2025-01-29T12:29:36Z
Message: the initial names have been accepted
Reason: InitialNamesAccepted
Status: True
Type: Established
Stored Versions:
v1
Events: <none>
5
Create a custom resource called datacenter and the apiVersion should be traffic.controller/v1.
Set the dataField length to 2 and access permission should be true.

정답
kind: Global
apiVersion: traffic.controller/v1
metadata:
name: datacenter
spec:
dataField: 2
access: true