0
respostas

Erro ao executar "kubectl apply -f deployment.yaml"

Consegui resolver esse problema fazendo algumas alterações no arquivo deployment.yaml, segue:

apiVersion: v1
kind: Service
metadata:
  name: esp-airportnames
spec:
  ports:
  - port: 80
    targetPort: 8081
    protocol: TCP
    name: http
  selector:
    app: esp-airportnames
  type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: esp-airportnames  
spec:
  selector:
    matchLabels:
      app: esp-airportnames
  replicas: 1
  template:
    metadata:
      labels:
        app: esp-airportnames
    spec:
      containers:
      # [START esp]
      - name: esp
        image: gcr.io/endpoints-release/endpoints-runtime:1
        args: [
          "--http_port=8081",
          "--backend=127.0.0.1:8080",
          "--service=<SEU_ENDPOINT>",
          "--rollout_strategy=managed",
        ]
      # [END esp]
        ports:
        - containerPort: 8081
      - name: airportnames
        image: registry.hub.docker.com/rmerces/airportnames
        ports:
        - containerPort: 8080