skaffold: GKE LoadBalancer doesn't work with service deployed by Skaffold

I have a service with type: Loadbalancer that I deploy with Skaffold. The service creates fine, the load balancer shows as healthy on the GCP console, but when I do kubectl get svc the External IP address never gets resolved and is stuck in <pending>. Everything works if I deploy same service using kubectl apply.

I actually have this on video as well: https://youtu.be/JUFIF9QMN9M?t=1630

This has happened multiple times with multiple clusters, projects, and services. @ahmetb is experiencing the same issue as well.

Right now, I’m thinking there is something Skaffold does to the service (labels?) which is preventing the service from getting the external IP address.

Information

  • Skaffold version: v.0.11.0
  • Operating system: Linux
  • Contents of skaffold.yaml:

Service YAML

apiVersion: v1
kind: Service
metadata:
  name: uptimecheck
  labels:
    app: uptimecheck
spec:
  type: LoadBalancer
  ports:
  - port: 80
    targetPort: 3000
    protocol: TCP
    name: http
  selector:
    app: "uptimecheck"

Skaffold YAML

apiVersion: skaffold/v1alpha2
kind: Config
build:
  artifacts:
  - imageName: gcr.io/xxx/xxx
deploy:
  kubectl:
    manifests:
      - svc.yaml

Steps to reproduce the behavior

skaffold dev

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 15 (14 by maintainers)

Most upvoted comments

Progress debugging this: So if I do skaffold delete wait 5 mins (so underlying GCE networking resources deleted) and redeploy with skaffold run I can repro this 100%.

+Bonus: if I do kubectl get -o=yaml service/frontend-external | kubectl apply -f- which causes a “re-apply”, then it gets the EXTERNAL-IP right away.