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]#
  • 相关阅读:
    Linuxboot:linux as UEFI,linux over UEFI
    在阿里云上安装黑苹果的一种设想
    Dsm as deepin mate(3):离线编辑初始镜像,让skynas本地验证启动安装/升级
    硬件融合的新起点:虚拟firmware,avatt的编译(2)
    将虚拟机集成在BIOS和EFI层,vavvt的编译(1)
    2013.08.19—2013.08.23周总结
    关于自我介绍
    Java入门系列:实例讲解ArrayList用法
    Hadoop文件的基本操作
    继承关系的理解
  • 原文地址:https://www.cnblogs.com/dream397/p/14840723.html
Copyright © 2011-2022 走看看