skaffold
skaffold copied to clipboard
skaffold.yaml with only `portForward` errors out with "nothing to deploy"
We have a utility skaffold file called skaffold.forward.yaml which developers can use to forward some usually non-exposed ports. The file works with skaffold v1, but does not work with skaffold v2.
Expected behavior
$ skaffold1 run -f ./skaffold.forward.yaml --port-forward=user
Listing files to watch...
WARN[0000] k8s/*.yaml did not match any file subtask=-1 task=DevLoop
Generating tags...
Checking cache...
Tags used in deployment:
Starting deploy...
WARN[0000] k8s/*.yaml did not match any file subtask=-1 task=DevLoop
Waiting for deployments to stabilize...
Deployments stabilized in 11.509247ms
Port forwarding Service/ingress-nginx-controller in namespace ingress-nginx, remote port 443 -> http://127.0.0.1:443
Port forwarding Service/ingress-nginx-controller in namespace ingress-nginx, remote port 80 -> http://127.0.0.1:80
Actual behavior
$ skaffold2 run -f ./skaffold.forward.yaml --port-forward=user
No tags generated
Starting test...
WARN[0000] k8s/*.yaml did not match any file subtask=-1 task=DevLoop
Starting deploy...
nothing to deploy
Information
- Skaffold version: v2.13.1
- Operating system: Ubuntu 24.04
- Installed via: skaffold.dev
- Contents of skaffold.yaml:
apiVersion: skaffold/v2beta28
kind: Config
portForward:
- resourceType: Service
resourceName: ingress-nginx-controller
namespace: ingress-nginx
port: 80
address: 127.0.0.1
localPort: 80
- resourceType: Service
resourceName: ingress-nginx-controller
namespace: ingress-nginx
port: 443
address: 127.0.0.1
localPort: 443
(simplified example, we have many other forwards)
Steps to reproduce the behavior
- Install ingress-nginx
- Run the above yaml with skaffold v1 vs skaffold v2