Reputation: 13
error: resource mapping not found for name: "pod-info-deployment" namespace: "development" from "deployment.yaml": no matches for kind "Deployment" in version "app/v1"
ensure CRDs are installed first
This is deployment.yaml
file which I'm running.
---
apiVersion: app/v1
kind: Deployment
metadata:
name: pod-info-deployment
namespace: development
labels:
app: pod-info
spec:
replicas: 3
selectors:
matchLabels:
app: pod-info # select pods with this label to be managed by the deployment.
template:
metadata:
labels:
app: pod-info # add a new label for each instance of our application that is
spec:
containers:
- name: pod-info-container
image: kimschles/pod-info-app:latest
ports:
- containerPort: 3000
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: metadata.podIP
I was running this kubectl apply -f deployment.yaml
It return error.
Upvotes: 0
Views: 1345
Reputation: 21
There are three mistakes
Upvotes: 2
Reputation: 12029
You have a typo in your apiVersion
of the manifest. It should be apps/v1
not app/v1
Upvotes: 1