zoukankan      html  css  js  c++  java
  • k8s crds

    [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]#
  • 相关阅读:
    iframe 的自适应高度
    在repeater、datalist控件中使用分页功能
    多语言网站开发:不完全技术分析
    提高ASP.Net应用程序性能的十大方法
    使用ASP在线解压rar文件
    在C#程序设计中使用Win32类库
    FCKeditor 2.0 的设置.修改.使用
    Windows Server 2003 四种版本的区别
    在ASP中应用FCKeditor2.1.1
    获得汉字的拼音首字母源代码
  • 原文地址:https://www.cnblogs.com/dream397/p/14840723.html
Copyright © 2011-2022 走看看