Slide 14
Slide 14 text
Presented by @makocchi
Kubernetes meetup Tokyo #29
14
apiVersion: apps/v1
kind: Deployment
metadata:
name: mydeploy
spec:
selector:
matchLabels:
app: myapp
replicas: 3
template:
metadata:
labels:
app: myapp
app_version: 20200326
spec:
containers:
- name: myapp
image: myapp:latest
ports:
- containerPort: 80
$ kubectl apply -f pod.yaml
Error from server (BadRequest): error when creating "pod.yaml": Deployment in version "v1"
cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template:
v1.PodTemplateSpec.ObjectMeta: v1.ObjectMeta.Labels: ReadString: expects " or n, but found
2, error found in #10 byte of ...|version":20200326}},|..., bigger context ...|metadata":
{"labels":{"app":"myapp","app_version":20200326}},"spec":{"containers":
[{"image":"myapp:la|...