I am following this tutorial.
My objective was to create a Deployment made with a custom container instead of the hello container.
I made this my-custom-server-deployment.yaml
:
apiVersion: v1
kind: Deployment
metadata:
name: my-custom-server-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: my-custom
tier: backend
spec:
containers:
- name: my-custom-server
image: my-custom-server
ports:
containerPort: 3000
I tried to build it with kubectl create -f my-custom-server-deployment.yaml
and i got:
error: error validating "my-custom-server-deployment.yaml": error validating data: couldn't find type: v1.Deployment; if you choose to ignore these errors, turn validation off with --vali
date=false
When i add --validate=false
i get:
no matches for /, Kind=Deployment
I thought this was pretty straight forward. What am i doing wrong?
Try using apiVersion: apps/v1beta1
instead. I believe Deployments is a still a beta feature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With