-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependencies in kubectl deployments? #3321
Comments
@dirkevertz We are aware of this issue and the team is working on a plan to preserve 1* (numbering) for kubectl render support. |
/cc @gsquared94 to add example with multiple deployers with CRDs etc. I don't think we still support multiple deployers of same type right? |
Subtaks for #5857 |
I would recommend trying out kpt deployer that can handle a lot of these scenarios about the right order of deploys. Here's an example how: https://github.com/GoogleContainerTools/skaffold/tree/master/codelab/02_kpt-deploy Alternately, Since you know the exact order that the deploy needs to be applied you can also do: apiVersion: skaffold/v2beta18
kind: Config
deploy:
kubectl:
- ./kubernetes-manifests/0_all-in-one-dbless.yaml
---
apiVersion: skaffold/v2beta18
kind: Config
deploy:
kubectl:
- ./kubernetes-manifests/1_nodejs.deployment.yaml
- ./kubernetes-manifests/2_nodejs.service.deployment.yaml
- ./kubernetes-manifests/3_nodejs.ingress.deployment.yaml
- ./kubernetes-manifests/4_rate_limiting.yaml
|
Worked for me. Thank you. |
Is there any possibility to take care of dependencies or to enforce that separate kubectl commands are launched (instead of a single one)? I am facing the issue, that the deployment fails due to an "unable to recognize"-error:
error: unable to recognize "c:\\daten\\projects\\kubernetes\\nodejsSkaffold\\kubernetes-manifests\\4_rate_limiting.yaml": no matches for kind "KongPlugin" in version "configuration.konghq.com/v1"
See log file:
log.txt
This is caused due to the fact that 0_all-in-one-dbless.yaml needs to be deployed first of all (as KongPlugin is defined in this file).
Expected behavior
Enforce seperate execution of kubectl for certain files:
1st step: execute ./kubernetes-manifests/0_all-in-one-dbless.yaml
2nd step: execute
- ./kubernetes-manifests/1_nodejs.deployment.yaml
- ./kubernetes-manifests/2_nodejs.service.deployment.yaml
- ./kubernetes-manifests/3_nodejs.ingress.deployment.yaml
- ./kubernetes-manifests/4_rate_limiting.yaml
Actual behavior
Currently a single kubectl is executed:
kubectl --context docker-desktop create --validate=false --dry-run -oyaml -f c:\daten\projects\kubernetes\nodejsSkaffold\kubernetes-manifests\0_all-in-one-dbless.yaml -f c:\daten\projects\kubernetes\nodejsSkaffold\kubernetes-manifests\1_nodejs.deployment.yaml -f c:\daten\projects\kubernetes\nodejsSkaffold\kubernetes-manifests\2_nodejs.service.deployment.yaml -f c:\daten\projects\kubernetes\nodejsSkaffold\kubernetes-manifests\3_nodejs.ingress.deployment.yaml -f c:\daten\projects\kubernetes\nodejsSkaffold\kubernetes-manifests\4_rate_limiting.yaml
Information
apiVersion: skaffold/v1beta15
kind: Config
build:
tagPolicy:
sha256: {}
defines where to find the code at build time and where to push the resulting image
artifacts:
context: .
docker:
noCache: true
defines the Kubernetes manifests to deploy on each run
deploy:
kubectl:
flags:
apply:
- "--validate=false"
manifests:
# 0_all-in-one-dbless.yaml contents https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-dbless.yaml
- ./kubernetes-manifests/0_all-in-one-dbless.yaml
- ./kubernetes-manifests/1_nodejs.deployment.yaml
- ./kubernetes-manifests/2_nodejs.service.deployment.yaml
- ./kubernetes-manifests/3_nodejs.ingress.deployment.yaml
- ./kubernetes-manifests/4_rate_limiting.yaml
Steps to reproduce the behavior
skaffold <command>
The text was updated successfully, but these errors were encountered: