Search code examples
kubernetesskaffold

one or more valid Kubernetes manifests are required to run skaffold


When I run skaffold init in my app directory it shows me:

one or more valid Kubernetes manifests are required to run skaffold

The content of the directory:

enter image description here

Do I have to provide Kubernetes manifests file with for example Pod, Service, etc?


Solution

  • Yes, you need Kubernetes manifests in the same project. Typically a Deployment-manifest and perhaps Service and Ingress as well if you want.

    A Deployment-manifest can be generated with (using > to direct output to a file):

    kubectl create deployment my-app --image=my-image --dry-run -o yaml > deployment.yaml
    

    Note: There is a alpha feature flag --generate-manifests that might do this for you.

    E.g. with

    skaffold init --generate-manifests