Search code examples
ubuntukubernetesdevopsskaffold

sudo: unable to resolve host slave-node: Name or service not known when need to install skaffold on ubuntu 20


i want to use the skaffold in ubuntu 20 . i using this command for install :

curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

and it complete downloaded but after complete download it show me this message :

sudo: unable to resolve host slave-node: Name or service not known

i installed the kubernetes in my ubuntu

this is my skaffold.yaml in my project :

apiVersion: skaffold/v0.25.0
kind: Config
deploy:
  kubectl:
    manifests:
      - ./infra/k8s/*
build:
  local:
    push: false
  artifacts:
    - image: stephengrider/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: 'src/**/*.ts'
            dest: .

and when i run this command it show me this message :

parsing skaffold config: unknown api version: "skaffold/v0.25.0"

whats the problem ? how can i solve this problem ???


Solution

  • You are using wrong API version.

    Look at the skaffold.yaml reference page - you can see there proper apiVersion examples:

    apiVersion: skaffold/v2beta10 
    apiVersion: skaffold/v2beta9
    apiVersion: skaffold/v2alpha1
    etc
    

    Even if you use Skaffold v0.25.0 Release - 3/15/2019, there is a note that fix your problem.

    Note: This release comes with a new config version v1beta7. To upgrade your skaffold.yaml, use skaffold fix. If you don't upgrade, skaffold will auto-upgrade in memory as best it can, and print a warning message.

    So using apiVersion: skaffold/v1beta7 should help