Home > OS >  no matches for kind "configmap" in version "apps/v1"
no matches for kind "configmap" in version "apps/v1"

Time:07-08

Well, I'm using minikube v1.26.0 and kubectl to manage Kubernetes on my local machine, when I decide to create a ConfigMap with kubectl apply -f ConfigMapFile.yaml I'm getting error no matches for kind "configmap" in version "apps/v1"

ConfigMapFile.yaml

apiVersion: apps/v1 
kind: ConfigMap 
metadata:
  name: test-config-map 

data:
   .........

Seems Like ConfigMap is not allowed or deprecated in Kubernetes apps/v1, but cannot find any solution or tips that would help me with this problem.

CodePudding user response:

you need to use apiVersion: v1 for configmap. You can also check the version of any resource using:

kubectl api-resources |grep -i configmap
configmaps                        cm           v1                                     true         ConfigMap
  • Related