首页 > 其他分享 >k8s查看资源的api版本

k8s查看资源的api版本

时间:2023-06-12 11:11:06浏览次数:77  
标签:false 版本 v1 api io cattle k8s true

#方法1
[root@test-master deployment]# kubectl explain deployment
KIND:     Deployment
VERSION:  apps/v1

DESCRIPTION:
     Deployment enables declarative updates for Pods and ReplicaSets.

FIELDS:
   apiVersion	<string>
     APIVersion defines the versioned schema of this representation of an
     object. Servers should convert recognized schemas to the latest internal
     value, and may reject unrecognized values. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

   kind	<string>
     Kind is a string value representing the REST resource this object
     represents. Servers may infer this from the endpoint the client submits
     requests to. Cannot be updated. In CamelCase. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

   metadata	<Object>
     Standard object metadata.

   spec	<Object>
     Specification of the desired behavior of the Deployment.

   status	<Object>
     Most recently observed status of the Deployment.


#方法2
[root@test-master deployment]# kubectl api-resources
NAME                              SHORTNAMES   APIVERSION                             NAMESPACED   KIND
bindings                                       v1                                     true         Binding
componentstatuses                 cs           v1                                     false        ComponentStatus
configmaps                        cm           v1                                     true         ConfigMap
endpoints                         ep           v1                                     true         Endpoints
events                            ev           v1                                     true         Event
limitranges                       limits       v1                                     true         LimitRange
namespaces                        ns           v1                                     false        Namespace
nodes                             no           v1                                     false        Node
persistentvolumeclaims            pvc          v1                                     true         PersistentVolumeClaim
persistentvolumes                 pv           v1                                     false        PersistentVolume
pods                              po           v1                                     true         Pod
podtemplates                                   v1                                     true         PodTemplate
replicationcontrollers            rc           v1                                     true         ReplicationController
resourcequotas                    quota        v1                                     true         ResourceQuota
secrets                                        v1                                     true         Secret
serviceaccounts                   sa           v1                                     true         ServiceAccount
services                          svc          v1                                     true         Service
mutatingwebhookconfigurations                  admissionregistration.k8s.io/v1        false        MutatingWebhookConfiguration
validatingwebhookconfigurations                admissionregistration.k8s.io/v1        false        ValidatingWebhookConfiguration
customresourcedefinitions         crd,crds     apiextensions.k8s.io/v1                false        CustomResourceDefinition
apiservices                                    apiregistration.k8s.io/v1              false        APIService
controllerrevisions                            apps/v1                                true         ControllerRevision
daemonsets                        ds           apps/v1                                true         DaemonSet
deployments                       deploy       apps/v1                                true         Deployment
replicasets                       rs           apps/v1                                true         ReplicaSet
statefulsets                      sts          apps/v1                                true         StatefulSet
tokenreviews                                   authentication.k8s.io/v1               false        TokenReview
localsubjectaccessreviews                      authorization.k8s.io/v1                true         LocalSubjectAccessReview
selfsubjectaccessreviews                       authorization.k8s.io/v1                false        SelfSubjectAccessReview
selfsubjectrulesreviews                        authorization.k8s.io/v1                false        SelfSubjectRulesReview
subjectaccessreviews                           authorization.k8s.io/v1                false        SubjectAccessReview
horizontalpodautoscalers          hpa          autoscaling/v1                         true         HorizontalPodAutoscaler
cronjobs                          cj           batch/v1beta1                          true         CronJob
jobs                                           batch/v1                               true         Job
apps                                           catalog.cattle.io/v1                   true         App
clusterrepos                                   catalog.cattle.io/v1                   false        ClusterRepo
operations                                     catalog.cattle.io/v1                   true         Operation
certificatesigningrequests        csr          certificates.k8s.io/v1                 false        CertificateSigningRequest
leases                                         coordination.k8s.io/v1                 true         Lease
endpointslices                                 discovery.k8s.io/v1beta1               true         EndpointSlice
events                            ev           events.k8s.io/v1                       true         Event
ingresses                         ing          extensions/v1beta1                     true         Ingress
flowschemas                                    flowcontrol.apiserver.k8s.io/v1beta1   false        FlowSchema
prioritylevelconfigurations                    flowcontrol.apiserver.k8s.io/v1beta1   false        PriorityLevelConfiguration
apiservices                                    management.cattle.io/v3                false        APIService
authconfigs                                    management.cattle.io/v3                false        AuthConfig
clusterregistrationtokens                      management.cattle.io/v3                true         ClusterRegistrationToken
clusters                                       management.cattle.io/v3                false        Cluster
features                                       management.cattle.io/v3                false        Feature
groupmembers                                   management.cattle.io/v3                false        GroupMember
groups                                         management.cattle.io/v3                false        Group
preferences                                    management.cattle.io/v3                true         Preference
settings                                       management.cattle.io/v3                false        Setting
tokens                                         management.cattle.io/v3                false        Token
userattributes                                 management.cattle.io/v3                false        UserAttribute
users                                          management.cattle.io/v3                false        User
ingressclasses                                 networking.k8s.io/v1                   false        IngressClass
ingresses                         ing          networking.k8s.io/v1                   true         Ingress
networkpolicies                   netpol       networking.k8s.io/v1                   true         NetworkPolicy
runtimeclasses                                 node.k8s.io/v1                         false        RuntimeClass
poddisruptionbudgets              pdb          policy/v1beta1                         true         PodDisruptionBudget
podsecuritypolicies               psp          policy/v1beta1                         false        PodSecurityPolicy
clusterrolebindings                            rbac.authorization.k8s.io/v1           false        ClusterRoleBinding
clusterroles                                   rbac.authorization.k8s.io/v1           false        ClusterRole
rolebindings                                   rbac.authorization.k8s.io/v1           true         RoleBinding
roles                                          rbac.authorization.k8s.io/v1           true         Role
priorityclasses                   pc           scheduling.k8s.io/v1                   false        PriorityClass
csidrivers                                     storage.k8s.io/v1                      false        CSIDriver
csinodes                                       storage.k8s.io/v1                      false        CSINode
storageclasses                    sc           storage.k8s.io/v1                      false        StorageClass
volumeattachments                              storage.k8s.io/v1                      false        VolumeAttachment
navlinks                                       ui.cattle.io/v1                        false        NavLink
[root@test-master deployment]# kubectl api-resources |grep deployment
deployments                       deploy       apps/v1                                true         Deployment

标签:false,版本,v1,api,io,cattle,k8s,true
From: https://www.cnblogs.com/anslinux/p/17474465.html

相关文章

  • 使用SubWCRev命令将SVN版本号自动设置到vs软件版本中
    背景在软件开发过程中,每次对一个软件产品的release,都要处理该软件版本号。有的版本号是人为定的,有些是自动生成的,本文介绍在使用SVN版本管理软件的情况下,利用SVN的SubWCRev命令来自动生成对应svn修改版本的版本号,这样便于快速找到对应二进制的编译时的SVN版本号。操作步骤1.......
  • AK、SK实现(双方API交互:签名及验证)
    参考:https://blog.csdn.net/yqwang75457/article/details/1178154741、原理AK/SK:AK:AccessKeyId,用于标示用户。SK:SecretAccessKey,是用户用于加密认证字符串和用来验证认证字符串的密钥,其中SK必须保密。通过使用AccessKeyId/SecretAccessKey加密的方法来验证某个......
  • Win7使用最新的node.js(版本18.16.0)
    截至本文的发布时间2023.06.11,前端开发基础工具node.js的最新版本是18.16.0LTS可能有人要问,为什么要研究node.js在Win7系统下的兼容情况呢?你直接用Win10不就行了?如果你可以直接使用Win10,显然你不是这篇文章的推荐阅读对象,因为某些开发环境比较特殊,只能使用Win7而不允许使用Win......
  • 5分钟打通办公网与K8S集群网络
    在K8S的使用中,我们经常有通过办公网访问K8S集群的诉求,虽然可以通过NodePort等方式访问K8S,但在访问多副本中间件等情况下NodePort就捉襟见肘了。今天我们给大家介绍一个快捷的网络打通方案,可通过域名来轻松访问K8S集群。首先跟大家介绍一个开源工具:telepresence,我们可以使用它为......
  • Python Django Restful API simple JWT
    在这种情况下,您可以创建一个自定义权限类,并检查用户所属的任何组是否具有相应的权限。例如,您可以在Django后台为每个组定义一个具有读取权限(`view`权限)的权限对象。然后,在自定义权限类中检查用户组是否具有此权限。首先,在`models.py`文件中创建一个新的权限。例如,创建一个名......
  • 24 k8s安全认证
    一、安全认证1、访问控制概述客户端进行认证和鉴权操作。客户端在Kubernetes集群中,客户端通常有两类:UserAccount:一般是独立于kubernetes之外的其他服务管理的用户账号。ServiceAccount:kubernetes管理的账号,用于为Pod中的服务进程在访问Kubernetes时提供身份标识。2、认证、授权......
  • linux 内核版本
    截止支持时间CentOSversion  Releasedate  Fullupdates[40][41]  Maintenanceupdates[40][41]3  2004-03-19  2006-07-20  2010-10-31[42]4  2005-03-09  2009-03-31  2012-02-29[42][43]5  2007-04-12  2014-01-31  2017-03-3......
  • 总结常用的几种 api 方式调用saltstack
    saltstack本身是用python写的,用python调用saltstack相对来说比较简单. 我这里采用的是第一种方法,但不同的是用tornado自封装了一层api 1.PythonclientAPIhttp://docs.saltstack.com/en/latest/ref/clients/#salt.wheel.WheelClient.cmd优点:最简单,只要机器安装了saltstack,......
  • 如何安装和使用 Hugging Face Unity API
    HuggingFaceUnityAPI提供了一个简单易用的接口,允许开发者在自己的Unity项目中方便地访问和使用HuggingFaceAI模型,已集成到HuggingFaceInferenceAPI中。本文将详细介绍API的安装步骤和使用方法。安装步骤打开您的Unity项目导航至菜单栏的Window->Package......
  • 使用chatgpt根据openAI API key自定义关键词批量写文章
    使用chatgpt根据openAIAPIkey自定义关键词批量写文章使用方法:1.api.txt里放openaikey,每行一个,程序会随机使用一个KEY2.key.txt放关键词,根据关键词写文章。3.写好的文章会自动保存到wenzhang文件夹下。 写文章速度以来openaikey及本身网络速度。本视频录制采用1核1G机器运......