Complete the code to reference a value from values.yaml in a Helm template.
image: {{ .Values.[1] }}In Helm templates, you access values from values.yaml using .Values. Here, imageName is the correct key for the image name.
Complete the code to set the number of replicas from values.yaml in a Deployment template.
replicas: {{ .Values.[1] }}The number of replicas is usually set with the key replicaCount in values.yaml, accessed via .Values.replicaCount.
Fix the error in the template to correctly access the service port from values.yaml.
port: {{ .Values.[1] }}The service port is usually defined under servicePort in values.yaml. Access it with .Values.servicePort.
Fill both blanks to create a conditional block that checks if replicaCount is greater than 1.
{{- if gt .Values.[1] [2] }}
replicas: {{ .Values.replicaCount }}
{{- end }}The gt function checks if replicaCount is greater than 1. This condition controls scaling behavior.
Fill all three blanks to define a container port using values from values.yaml.
- name: app-container
image: {{ .Values.[1] }}
ports:
- containerPort: {{ .Values.[2] }}
protocol: [3]The container image is set with imageName, the port with containerPort, and the protocol is usually TCP by default.