首页 > 其他 > 详细

k8s crds

时间:2021-06-02 15:39:03      阅读:14      评论:0      收藏:0      [点我收藏+]

 

 

[root@cloud crds]# cat model.yaml 
apiVersion: devices.kubeedge.io/v1alpha2
kind: DeviceModel
metadata:
  name: temperature-model-simulate
  namespace: default
spec:
  properties:
    - name: temperature-status
      description: Temperature collected from the edge device
      type:
        string:
          accessMode: ReadOnly
          defaultValue: ‘‘

 

 

[root@cloud crds]# kubectl apply -f model.yaml 
devicemodel.devices.kubeedge.io/temperature-model-simulate created
[root@cloud crds]# kubectl get crds temperature-model-simulate
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "temperature-model-simulate" not found

 

 

[root@cloud crds]# kubectl get devicemodel temperature-model-simulate
NAME                         AGE
temperature-model-simulate   2m41s
[root@cloud crds]# 

 

[root@cloud crds]# kubectl get devicemodel temperature-model-simulate  -o yaml
apiVersion: devices.kubeedge.io/v1alpha2
kind: DeviceModel
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"devices.kubeedge.io/v1alpha2","kind":"DeviceModel","metadata":{"annotations":{},"name":"temperature-model-simulate","namespace":"default"},"spec":{"properties":[{"description":"Temperature collected from the edge device","name":"temperature-status","type":{"string":{"accessMode":"ReadOnly","defaultValue":""}}}]}}
  creationTimestamp: "2021-06-02T03:48:54Z"
  generation: 1
  managedFields:
  - apiVersion: devices.kubeedge.io/v1alpha2
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:kubectl.kubernetes.io/last-applied-configuration: {}
      f:spec:
        .: {}
        f:properties: {}
    manager: kubectl
    operation: Update
    time: "2021-06-02T03:48:54Z"
  name: temperature-model-simulate
  namespace: default
  resourceVersion: "6161945"
  selfLink: /apis/devices.kubeedge.io/v1alpha2/namespaces/default/devicemodels/temperature-model-simulate
  uid: cbba9acd-f79f-4cdb-a611-56c3e77bb030
spec:
  properties:
  - description: Temperature collected from the edge device
    name: temperature-status
    type:
      string:
        accessMode: ReadOnly
        defaultValue: ""
[root@cloud crds]# 

 

[root@cloud temperature_yaml]# kubectl get devicemodel 
NAME                         AGE
temperature-model-simulate   4m50s
traffic-light                19d
[root@cloud temperature_yaml]# kubectl get device
NAME                        AGE
temperature-simulate        77s
traffic-light-instance-01   39h
[root@cloud temperature_yaml]#

 

k8s crds

原文:https://www.cnblogs.com/dream397/p/14840723.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!