Custom Resources

Controller

Créer une ressource personnalisée

CustomResourceDefinition

Inspecter

$ k 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:  2024-02-04T19:41:46Z
  Generation:          1
  Resource Version:    1004
  UID:                 f8613d5c-4f16-4eeb-8ad0-1fb73c634957
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:  2024-02-04T19:41:46Z
    Message:               no conflicts found
    Reason:                NoConflicts
    Status:                True
    Type:                  NamesAccepted
    Last Transition Time:  2024-02-04T19:41:46Z
    Message:               the initial names have been accepted
    Reason:                InitialNamesAccepted
    Status:                True
    Type:                  Established
  Stored Versions:
    v1
Events:  <none>

Lister

$ kubectl get crd
NAME                                                  CREATED AT
bgpconfigurations.crd.projectcalico.org               2024-02-04T07:54:45Z
bgppeers.crd.projectcalico.org                        2024-02-04T07:54:45Z
blockaffinities.crd.projectcalico.org                 2024-02-04T07:54:45Z
caliconodestatuses.crd.projectcalico.org              2024-02-04T07:54:45Z

Custom Controller

Implémenter un contrôleur

Déployer

Operator framework