Ich folge this tutorial.Konnte Typ nicht finden: v1.Deployment
Mein Ziel war es, eine Bereitstellung mit einem benutzerdefinierten Container anstelle des Hallo-Containers erstellt.
Ich machte dieses 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
Ich versuchte es mit kubectl create -f my-custom-server-deployment.yaml
zu bauen und ich erhielt:
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
Wenn ich --validate=false
hinzufügen i erhalten:
no matches for /, Kind=Deployment
Ich dachte, Das war ziemlich geradlinig. Was mache ich falsch?
Können Sie 'kubectl version' bitte hinzufügen? – johnharris85
'kubectl api-versions | grep apps' gibt dir die unterstützte api-Version – sfgroups