Olá pessoal, ao tentar criar a svc-pod-2.yaml, ocorreu o erro abaixo, alguém pode me ajudar por favor?
pod-2.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod-2
labels:
app: segundo-pod
spec:
containers:
- name: container-pod-2
image: nginx:latest
ports:
- containerPort: 80
svc-pod-2.yaml
apiVersion: v1
kind: Service
metadata:
name: svc-pod-2
spec:
type: ClusterIP
selector:
app: segundo-pod
ports:
- port: 80
Erro após tentativa de criação do svc-pod-2yaml
PS C:\Users\Michael\Desktop\kubernetes-alura> kubectl apply -f .\svc-pod-2.yaml
error: error validating ".\\svc-pod-2.yaml": error validating data: ValidationError(Service.spec.selector.ports): invalid type for io.k8s.api.core.v1.ServiceSpec.selector: got "array", expected "string"; if you choose to ignore these errors, turn validation off with --validate=false