cancel
Showing results for 
Search instead for 
Did you mean: 
bkhoo
Cadet
Cadet
  • 465 Views

ch07s05: affinity and toleration

in ch07s05, affinity and tolerations are incorrectly specified in the following respoctively:

  • spec.affinity
  • spec.toleration

affinity and tolerations should be configured in: spec.template.spec, like:

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: example-vm-pod-affinity
spec:
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: example.io/example-key
operator: In
values:
- example-value-1
- example-value-2

and:

metadata:
name: example-vm-tolerations
apiVersion: kubevirt.io/v1
kind: VirtualMachine
spec:
template:
spec:
tolerations:
- key: "key"
operator: "Equal"
value: "virtualization"
effect: "NoSchedule"

notes:

1 Reply
Chetan_Tiwary_
Community Manager
Community Manager
  • 458 Views

@bkhoo Thanks , I will check the same and report that to the course development team via an internal ticket. 

0 Kudos
Join the discussion
You must log in to join this conversation.