Good talk! At 29:10 (and elsewhere) If you don't wanna scroll through your terminal buffer when looking for a line or two, can pipe to less like so: kubectl --namespace argo get deployment argo-server --output yaml | less (then search with vim keybinding forward slash "/")
Long time listener, first time commenter - this may not have been the case when you made this video, but evidently kustomize is native to kubectl, so if you do, "kubectl apply -k whatever/" it will be the same as "kustomize build whatever/" ... of course, there may be some minor incompatibilities. The reason I mention this is because I was trying to build everything inside of a docker container to keep my experiment isolated, and it's kind of tricky to install kustomize, but pretty trivial to install kubectl.
At the time I recorded that video, kustomize that was baked into kubectl was very old and there were some issues that prevented the team from upgrading it. That is now solved and now I use only the one in kubectl.
I am now at a point where I am frustrated with helm. Somehow, we still need to spend lots of time to customise helm charts for new apps we create. It would be nice to have a generic helm chart for all situations but not sure if that can be maintained well. Will try out Kustomize and other tools.
is it still okay to ask some question related Rancher, I hope i am not putting you in trouble since you joined Shipa :) I am currently using Rancher but definitely want to shift to Shipa, the only thing about rancher is it extreamly easy to understand at first glance, where in shipa need to understand too much terminology like frameworks, plans, services etc, it would be cool if you make more videos on Shipa for each section particular :)
No worries. You're not putting me into any trouble. To begin with, this channel is not influenced by the company I work for (it was not in the past, and it will not be in the future). Also, Shipa and Rancher are solving very different problems. Rancher helps you create and manage k8s clusters, while Shipa simplifies app management for devs and gives ops the tools to help devs. I'll certainly make more videos about Shipa. I might do one more on this channel, and everything else in the Shipa channel (so that my channel keeps being neutral and focused on different tech). In other words, more is coming... :)
Thank you for this demonstration :) I'm wondering how we can implement this with merge requests to deploy from staging to a production environment for exemple..
I would recommend using Argo CD or Flux together with Kustomize. If you do, you would have repositories with definitions of what is running in each environment. Those definitions would be only links to app repos where Kustomize (or Helm) manifests are defined, and provide values or patches that should be overwritten. Take a look at czcams.com/video/vpWQeoaiRM4/video.html or czcams.com/video/R6OeIgb7lUI/video.html
Hi great channel! But i didn't really understand how you applied the patch specific to production, i didn't see you specify a namespace or anything? How do you make sure that only overlays/production gets executed for production and not for the other environments?
Assuming that you are executing the commands directly, the command (gist.github.com/vfarcic/07b0b4642b5694d0239ee7c1629173ce#file-02-02-kustomize-sh-L70) points to the overlays/production directory that contains kustomization.yaml (github.com/vfarcic/argocd-production/blob/master/argo-workflows/overlays/production/kustomization.yaml). Now, in that specific case, the Namespace is not defined in kustomization.yaml since there is only production and the manifests themselves have `metadata.namespace` set. If you would have multiple environments (Namespaces) in the same cluster, you would remove `metadata.namespace` from manifests and specify it inside `kustomization.yaml`. If you would go further, you would use Argo CD or Flux to manage actual deployments and, in those cases, you would not be executing `kustomize` commands. Please let me know if that answers your question. I might have misunderstood what you're asking.
I haven't tried `kubectl -k` with the examples I used in that video. It's possible, or even likely, that something doesn't work. The issue is that Kustomize inside `kubectl` is behind `kustomize` binary. Effectively, if you choose to use `kubectl -k`, you are choosing to be behind and use older version of Kustomize. That's one of the things I never liked with `kubectl -k`.
kubectl is using old V2 of kustomize binary and kustomize binary is on V3 which is why the "kubectl apply -k" doesn't work in the example. For more feature rich experience use the kustomize commands and pipe it to kubectl apply.
Terragrunt is indeed similar. If YAML the preferable way to define k8s resources and Terraform is for infrastructure, Kustomize to YAML is what Terragrunt is to Terraform. Now, I wouldn't add it to the comparizon with Kustomize and Helm since the two are about k8s resources and Terragrunt is about infrastructure (with Terraform). What might be interesting is to paint the whole picture using Kustomize and Terraform to have a similar logic to manage everything, from infra to the apps in k8s. WDYT?
When you say "generate a basic template", do you mean from the perspective of shifting left or something else. In any case, Kustomize does not help you define manifests or templates. It enables you to define overlays that deal with variations between different environments. Just as with "pure k8s YAML" or Helm, you need to write manifests first and then use Kustomize to create overlays. Now, you can choose one of the solutions that provide opinionated application management (e.g., Ketch, Knative, etc.). Those simplify definitions of the manifests, but at the cost of flexibility. Or, you can use one of the tools that allow you to create opinionated definitions (e.g., OAM/KubeVela, Crossplane) that enable you to get to a similar point to the first group. They require more initial involvement but provide greater flexibility. All that being said, I have the feeling that I misunderstood your question. If that's the case, please elaborate a bit more and I'll do my best to be more helpful. Or, even better, join one of the upcoming live AMA sessions or the monthly members-only chat and we can discuss it live.
Yes please . A comparison between Helm and Kustomize will be nice.
It's coming :)
Done! The comparison is available at czcams.com/video/ZMFYSm0ldQ0/video.html
@@DevOpsToolkit and it's great.
This video shows more practical and easy-to-understand examples than Kubernetes official documentation.
Thanks
This is the best Kustomize video I found online, really appreciate.
Good talk! At 29:10 (and elsewhere) If you don't wanna scroll through your terminal buffer when looking for a line or two, can pipe to less like so:
kubectl --namespace argo get deployment argo-server --output yaml | less
(then search with vim keybinding forward slash "/")
Great overview of Kustomize. Thank you for that 🙏☺️
Hi Victor, a comparison between Helm and Kustomize would be awesome! Please and thank you!
Noted! Coming soon :)
Long time listener, first time commenter - this may not have been the case when you made this video, but evidently kustomize is native to kubectl, so if you do, "kubectl apply -k whatever/" it will be the same as "kustomize build whatever/" ... of course, there may be some minor incompatibilities. The reason I mention this is because I was trying to build everything inside of a docker container to keep my experiment isolated, and it's kind of tricky to install kustomize, but pretty trivial to install kubectl.
At the time I recorded that video, kustomize that was baked into kubectl was very old and there were some issues that prevented the team from upgrading it. That is now solved and now I use only the one in kubectl.
Love your videos waiting for the next one 😀
More to come!
Very well-structured content!
Thank you. This helps me so much!
Glad it helped!
GREAT Subject!!
Great job!! awesome video!!
Thank you sir!
I am now at a point where I am frustrated with helm. Somehow, we still need to spend lots of time to customise helm charts for new apps we create. It would be nice to have a generic helm chart for all situations but not sure if that can be maintained well. Will try out Kustomize and other tools.
Please do a video about Argo Workflow as well lol
Workflows is coming as well!
is it still okay to ask some question related Rancher, I hope i am not putting you in trouble since you joined Shipa :) I am currently using Rancher but definitely want to shift to Shipa, the only thing about rancher is it extreamly easy to understand at first glance, where in shipa need to understand too much terminology like frameworks, plans, services etc, it would be cool if you make more videos on Shipa for each section particular :)
No worries. You're not putting me into any trouble. To begin with, this channel is not influenced by the company I work for (it was not in the past, and it will not be in the future). Also, Shipa and Rancher are solving very different problems. Rancher helps you create and manage k8s clusters, while Shipa simplifies app management for devs and gives ops the tools to help devs.
I'll certainly make more videos about Shipa. I might do one more on this channel, and everything else in the Shipa channel (so that my channel keeps being neutral and focused on different tech). In other words, more is coming... :)
@@DevOpsToolkit Hurray! great to hear :) keep posting
Thanks for the great video. I would like to have the Argo workflows one as well please :-)
Argo Workflows is (probably) coming next week :) This Thursday will be about a prerequisite for Argo Workflows (you can probably guess what that is).
A video about crossplane and your honest opinions about it would be interesting
Crossplane is already scheduled. It'll probably take a few weeks (up to a month) until it comes.
Crossplane video has been published few hours ago. Thanks for the suggestion. Keep it coming.
Marla Singer :-)
Oh yeah!
Excelent!
Thanks
Thank you for this demonstration :) I'm wondering how we can implement this with merge requests to deploy from staging to a production environment for exemple..
I would recommend using Argo CD or Flux together with Kustomize. If you do, you would have repositories with definitions of what is running in each environment. Those definitions would be only links to app repos where Kustomize (or Helm) manifests are defined, and provide values or patches that should be overwritten.
Take a look at czcams.com/video/vpWQeoaiRM4/video.html or czcams.com/video/R6OeIgb7lUI/video.html
Thanks!
Thanks a ton Leandro.
Please do a helm comparison!
Something like czcams.com/video/ZMFYSm0ldQ0/video.html
Hi great channel! But i didn't really understand how you applied the patch specific to production, i didn't see you specify a namespace or anything?
How do you make sure that only overlays/production gets executed for production and not for the other environments?
Assuming that you are executing the commands directly, the command (gist.github.com/vfarcic/07b0b4642b5694d0239ee7c1629173ce#file-02-02-kustomize-sh-L70) points to the overlays/production directory that contains kustomization.yaml (github.com/vfarcic/argocd-production/blob/master/argo-workflows/overlays/production/kustomization.yaml). Now, in that specific case, the Namespace is not defined in kustomization.yaml since there is only production and the manifests themselves have `metadata.namespace` set. If you would have multiple environments (Namespaces) in the same cluster, you would remove `metadata.namespace` from manifests and specify it inside `kustomization.yaml`. If you would go further, you would use Argo CD or Flux to manage actual deployments and, in those cases, you would not be executing `kustomize` commands.
Please let me know if that answers your question. I might have misunderstood what you're asking.
How do you rollback a release using kustomize?
Revert the git commit and reapply the manifests.
Why don’t you use skaffold? It works with kustomize too.
That video is focused on customize alone. You will find videos about scaffold and quite a few other tools on this channel as well.
Your kustomization.yaml works with "kustomize build" but not with "kubectl apply -k". Any idea why?
I haven't tried `kubectl -k` with the examples I used in that video. It's possible, or even likely, that something doesn't work.
The issue is that Kustomize inside `kubectl` is behind `kustomize` binary. Effectively, if you choose to use `kubectl -k`, you are choosing to be behind and use older version of Kustomize. That's one of the things I never liked with `kubectl -k`.
kubectl is using old V2 of kustomize binary and kustomize binary is on V3 which is why the "kubectl apply -k" doesn't work in the example. For more feature rich experience use the kustomize commands and pipe it to kubectl apply.
👌👏
It is very resembles to terragrunt / terraform
I think terragrunt can be third column for your matrix compare kustimiz/helm/terragrunt
Terragrunt is indeed similar. If YAML the preferable way to define k8s resources and Terraform is for infrastructure, Kustomize to YAML is what Terragrunt is to Terraform.
Now, I wouldn't add it to the comparizon with Kustomize and Helm since the two are about k8s resources and Terragrunt is about infrastructure (with Terraform).
What might be interesting is to paint the whole picture using Kustomize and Terraform to have a similar logic to manage everything, from infra to the apps in k8s. WDYT?
A comparison between Helm and Kustomize, kinda confused about when to use one over the other.
It's coming!
ingress-nginx or nginx-ingress, which one?
ingress-nginx
Comparison to carvel?
Added to the TODO list :)
Is there a way to generate a basic template with a deployment, ingress, etc?
When you say "generate a basic template", do you mean from the perspective of shifting left or something else.
In any case, Kustomize does not help you define manifests or templates. It enables you to define overlays that deal with variations between different environments. Just as with "pure k8s YAML" or Helm, you need to write manifests first and then use Kustomize to create overlays.
Now, you can choose one of the solutions that provide opinionated application management (e.g., Ketch, Knative, etc.). Those simplify definitions of the manifests, but at the cost of flexibility. Or, you can use one of the tools that allow you to create opinionated definitions (e.g., OAM/KubeVela, Crossplane) that enable you to get to a similar point to the first group. They require more initial involvement but provide greater flexibility.
All that being said, I have the feeling that I misunderstood your question. If that's the case, please elaborate a bit more and I'll do my best to be more helpful. Or, even better, join one of the upcoming live AMA sessions or the monthly members-only chat and we can discuss it live.
@@DevOpsToolkit Something like the helm create command. Where you don't have to start from scratch on the yaml files.
@@williampolinchak I don't think there is something equivalent to `helm create` in Kustomize.
Wrong link on gist. (I have found the right gist).
Thanks for letting me know. I just corrected it...