Get Kinds and Versions supported by a Kubernetes Cluster

Ashok Pon Kumar Sree Prakash
2 min readJan 13, 2021

--

Quick way to enumerate capabilities supported by a Kubernetes cluster

Each Kubernetes version and installation supports different sets of capabilities based on what and how they were installed. To identify all these capabilities you need to execute multiple kubectl commands like kubectl api-versions and a lot more to get a usable list.

The collect capability of Move2Kube can be exploited to get this list too. To do that,

  1. Install Move2Kube
  2. Set the cluster in context for your kubectl
  3. Run move2kube collect
  4. You will find all data in a file named m2k_collect/clusters/<clusterid>.yaml

In addition to the Kinds and versions it also lists all storage classes supported by the cluster. As we enhance capabilities of Move2Kube, and as more info about the cluster is required, we will augment them to the collect capability.

apiVersion: move2kube.konveyor.io/v1alpha1
kind: ClusterMetadata
metadata:
name: IBM-IKS
spec:
storageClasses:
- default
- ibmc-block-bronze
- ibmc-block-custom
- ibmc-block-gold
- ibmc-block-retain-bronze
- ibmc-block-retain-custom
- ibmc-block-retain-gold
- ibmc-block-retain-silver
- ibmc-block-silver
- ibmc-file-bronze
- ibmc-file-bronze-gid
- ibmc-file-custom
- ibmc-file-gold
- ibmc-file-gold-gid
- ibmc-file-retain-bronze
- ibmc-file-retain-custom
- ibmc-file-retain-gold
- ibmc-file-retain-silver
- ibmc-file-silver
- ibmc-file-silver-gid
apiKindVersionMap:
APIService:
- apiregistration.k8s.io/v1
BGPConfiguration:
- crd.projectcalico.org/v1
BGPPeer:
- crd.projectcalico.org/v1
Binding:
- v1
BlockAffinity:
- crd.projectcalico.org/v1
CSIDriver:
- storage.k8s.io/v1
- storage.k8s.io/v1beta1
CSINode:
- storage.k8s.io/v1
- storage.k8s.io/v1beta1
CatalogSource:
- operators.coreos.com/v1alpha1
CertificateSigningRequest:
- certificates.k8s.io/v1beta1
ClusterInformation:
- crd.projectcalico.org/v1
ClusterRole:
- rbac.authorization.k8s.io/v1
- rbac.authorization.k8s.io/v1beta1
ClusterRoleBinding:
- rbac.authorization.k8s.io/v1
- rbac.authorization.k8s.io/v1beta1
ClusterServiceVersion:
- operators.coreos.com/v1alpha1
ComponentStatus:
- v1
ConfigMap:
- v1
ControllerRevision:
- apps/v1
CronJob:
- batch/v1beta1
- batch/v2alpha1
CustomResourceDefinition:
- apiextensions.k8s.io/v1
DaemonSet:
- apps/v1
Deployment:
- apps/v1
EndpointSlice:
- discovery.k8s.io/v1beta1
Endpoints:
- v1
Event:
- events.k8s.io/v1beta1
- v1
FelixConfiguration:
- crd.projectcalico.org/v1
GlobalNetworkPolicy:
- crd.projectcalico.org/v1
GlobalNetworkSet:
- crd.projectcalico.org/v1
HorizontalPodAutoscaler:
- autoscaling/v1
- autoscaling/v2beta1
- autoscaling/v2beta2
HostEndpoint:
- crd.projectcalico.org/v1
IPAMBlock:
- crd.projectcalico.org/v1
IPAMConfig:
- crd.projectcalico.org/v1
IPAMHandle:
- crd.projectcalico.org/v1
IPPool:
- crd.projectcalico.org/v1
Ingress:
- networking.k8s.io/v1
- networking.k8s.io/v1beta1
- extensions/v1beta1
IngressClass:
- networking.k8s.io/v1
- networking.k8s.io/v1beta1
InstallPlan:
- operators.coreos.com/v1alpha1
Job:
- batch/v1
KubeControllersConfiguration:
- crd.projectcalico.org/v1
Lease:
- coordination.k8s.io/v1beta1
- coordination.k8s.io/v1
LimitRange:
- v1
LocalSubjectAccessReview:
- authorization.k8s.io/v1
- authorization.k8s.io/v1beta1
MutatingWebhookConfiguration:
- admissionregistration.k8s.io/v1beta1
- admissionregistration.k8s.io/v1
Namespace:
- v1
NetworkPolicy:
- networking.k8s.io/v1
NetworkSet:
- crd.projectcalico.org/v1
Node:
- v1
Operator:
- operators.coreos.com/v1
OperatorGroup:
- operators.coreos.com/v1
PersistentVolume:
- v1
PersistentVolumeClaim:
- v1
Pod:
- v1
PodDisruptionBudget:
- policy/v1beta1
PodSecurityPolicy:
- policy/v1beta1
PodTemplate:
- v1
PriorityClass:
- scheduling.k8s.io/v1beta1
- scheduling.k8s.io/v1
RBACSync:
- ibm.com/v1alpha1
ReplicaSet:
- apps/v1
ReplicationController:
- v1
ResourceQuota:
- v1
Role:
- rbac.authorization.k8s.io/v1
- rbac.authorization.k8s.io/v1beta1
RoleBinding:
- rbac.authorization.k8s.io/v1
- rbac.authorization.k8s.io/v1beta1
Secret:
- v1
SelfSubjectAccessReview:
- authorization.k8s.io/v1
- authorization.k8s.io/v1beta1
SelfSubjectRulesReview:
- authorization.k8s.io/v1
- authorization.k8s.io/v1beta1
Service:
- v1
ServiceAccount:
- v1
StatefulSet:
- apps/v1
StorageClass:
- storage.k8s.io/v1
- storage.k8s.io/v1beta1
SubjectAccessReview:
- authorization.k8s.io/v1
- authorization.k8s.io/v1beta1
Subscription:
- operators.coreos.com/v1alpha1
TokenReview:
- authentication.k8s.io/v1
- authentication.k8s.io/v1beta1
ValidatingWebhookConfiguration:
- admissionregistration.k8s.io/v1beta1
- admissionregistration.k8s.io/v1
VolumeAttachment:
- storage.k8s.io/v1
- storage.k8s.io/v1beta1
VolumeAttachment:- storage.k8s.io/v1- storage.k8s.io/v1beta1

--

--

Ashok Pon Kumar Sree Prakash
Ashok Pon Kumar Sree Prakash

Written by Ashok Pon Kumar Sree Prakash

Creator of Konveyor Move2Kube. I manage the Hybrid Cloud Platforms team in IBM Research India.

No responses yet