I have a skaffold.yaml
file like below:
apiVersion: skaffold/v2alpha3
kind: Config
deploy:
mk:
manifests:
- ./infra/k8s/*
build:
local:
push: false
artifacts:
- image: learnertester/auth
context: auth
docker:
dockerfile: Dockerfile
sync:
manual:
- src: 'src/**/*.ts'
dest: .
- image: learnertester/ticketing-client
Now, I have installed microk8s
on Ubuntu 22.04 and want to use it. I have also defined an alias mk
for microk8s kubectl
. But when I change the following line:
deploy:
kubectl:
To:
deploy:
mk:
I get the below error running skaffold dev
:
parsing skaffold config: error parsing skaffold configuration file: unable to parse config: yaml: unmarshal errors:
line 55: field mk not found in type v2alpha3.DeployConfig
How should I fix that?
2
Answers
As per this doc , use deploy as
microk8s kubectl
instead mk.This might not be taking the alias mk or else you have not done a proper alias.
Then use as below and have a try :
Refer to this skafold.yaml doc for more information on yaml and also you need to use the correct dest path (#destination path in the container where the files should be synced to..)
You can also check out Cloud Code for IntelliJ and VS Code or the online Cloud Shell Editor which provides skaffold.yaml editing assistance, including highlighting errors in the file.
I face the same problem:
……
"Property microk8s kubectl is not allowed.yaml-schema: skaffold.yaml"
I found this solution from here:
https://github.com/GoogleContainerTools/skaffold/issues/5283
Ubuntu 20.04 Server – microk8s Kubernetes – old laptop as a server
. Undo alias commented or delete the line:
# alias kubectl=’microk8s kubectl’
. Install kubectl and export config
. scaffold.yaml infra/k8s the path for all .yaml files
.yaml for reference
Cheers!!