Welcome to the Linux Foundation Forum!

lab 4.5 error in stress.yaml

there is a error in the file in the source tar

line 26. there is a spec: that shouldn't be there

apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
generation: 1
labels:
run: stressmeout
name: stressmeout
spec:
replicas: 1
selector:
matchLabels:
run: stressmeout
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
run: stressmeout
spec:
** spec:**
nodeSelector:
kubernetes.io/hostname: worker #<<-- EDIT to be YOUR worker hostname
containers:
- image: vish/stress
imagePullPolicy: Always
name: stressmeout
args:
- -cpus
- "2"
- -mem-total
- "1950Mi"
- -mem-alloc-size
- "100Mi"
- -mem-alloc-sleep
- "1s"
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30

Comments

  • serewicz
    serewicz Posts: 1,000
    edited October 2020

    Hello,

    Thank you for the feedback. Upon looking at the material, you are saying there should be two spec entries? I'm not sure this is accurate. What error are you seeing when you try to use the file in the tarball?

    Also, when you paste as standard text to the forum it loses all the indentation. Perhaps paste as a graphic or code.

    Regards,

  • there are 2 specs line 25 and line 26

Categories

Upcoming Training