kubectl apply -f primeiro-pod.yaml
error: error parsing primeiro-pod.yaml: error converting YAML to JSON: yaml: line 7: did not find expected '-' indicator
kubectl apply -f primeiro-pod.yaml
error: error parsing primeiro-pod.yaml: error converting YAML to JSON: yaml: line 7: did not find expected '-' indicator
Oi Lucas, tudo bem?
Pode colar seu arquivo YAML
aqui?
apiVersion: v1
kind: Pod
metadata:
name: pod-1
labels:
app: primeiro-pod
spec:
containers:
- name: container-pod1
image: nginx:latest
ports:
- containerPort: 80
error: error validating "svc-pod-1.yaml": error validating data: [ValidationError(Service): unknown field "ports" in io.k8s.api.core.v1.Service, ValidationError(Service): unknown field "selector" in io.k8s.api.core.v1.Service]; if you choose to ignore these errors, turn validation off with --validate=false
esse erro aparece quando tento atualizar as configurações do service nodeport
apiVersion: v1
kind: Service
metadata:
name: svc-pod-1
spec:
type: NodePort
selector:
app: primeiro-pod
ports:
nodePort: 30000
port: 80