Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kubernetes error: unable to recognize "deployment.yaml": no matches for extensions/, Kind=Deployment

Integrated kubernetes with jenkins and run the command in Jenkins file kubectl create -f deployment.yaml --validate=false and getting the error:

unable to recognize "deployment.yaml": no matches for extensions/,Kind=Deployment

But if I run the same command in terminal I am able to deploy my image. deployment.yaml file is given below

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: appname
spec:
  template:
    metadata:
      labels:
        app: appname
    spec:
      containers:
      - name: appname
        image: appname
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8080
like image 952
Dhinesh Avatar asked May 14 '18 11:05

Dhinesh


1 Answers

I suppose your minikube (if you are checking in your local machine) is NOT running. Start minikube using the following command

  • $minikube start

Now try

  • $kubectl create OR
  • $kubectl apply
like image 134
Kevin Prasanna R R Avatar answered Nov 06 '22 21:11

Kevin Prasanna R R