1
1
GitOps Testing in Kubernetes
with Flux & Testkube
Abdallah Abedraba
Developer Advocate, TestKube
Stacey Potter
Community Manager, Weaveworks
2
2
Weaveworks is founded on open source
● Flux & Flagger (CNCF): GitOps and Progressive Delivery for k8s 🎓
● Weave GitOps: A powerful extension & web UI for Flux
● Weave GitOps Terraform Controller: Flux controller for Terraform
resources
● GitOps Tools for Flux: VS Code extension
weave.works
3
3
Speakers Help/Support
Abdallah Abedraba
Developer Advocate
Testkube
Stacey Potter
Community Manager
Weaveworks
Duration
30-60 Minutes
Browser
Safari copy/paste
shortcuts may not work
Using Zoom
Questions?
• Use chat (button: top
left corner of screen)
• Escape to exit full
screen
• “To Everyone” or “To
all panelists and
attendees”
Support:
https://support.zoom.us/hc/
en-us/articles/206175806-T
op-Questions
Troubleshooting
Use chat
If the issue is not easily resolved,
we ask that you follow along as
we demo the sample app.
GitOps Testing in Kubernetes with Flux & Testkube
4
4
👋 Get Connected 💬 🤝
● Fluxcd.io - ⭐ Star us on GitHub ⭐
● Check out the Flux docs at: fluxcd.io/docs/get-started/
● CNCF Slack #Flux channel (or get a slack invite)
● Testkube.io
● Testkube on GitHub
● Testkube on Discord
● Testkube Docs
5
5
Mar 9: CNCF on-demand webinar: Monolith Microservices
with Bite-sized Kubernetes
Mar 14: Building Internal Developer Platforms with EKS & GitOps
Mar 15: CloudNative Live: Automating Kubernetes Deployments
Mar 16: CNCF on-demand webinar: Kubernetes in 2023
Mar 23:VS Code Livestream: Automating Kubernetes Deployments
Mar 30:How Flux & Pulumi Give Each Other Super Powers
Upcoming Events
6
● GitOps is an app dev and operations methodology
● GitOps is a methodology, not a specific tool or
technology.
● GitOps applies to everything
and brings business value.
What is GitOps? … and why do I want it?
7
GitOps leverages:
● an entire system that is described declaratively
● code that is version controlled and
● software agents that reconcile and ensure correctness
(along with alerts, etc).
4 Principles of GitOps
8
Confidential do not distribute 8
Demo Time!
About me
2023
Abdallah Abedraba
● Developer Advocate at Testkube.io
● Background: DevRel, Software Engineer,
Product
● Twitter: @aabedraba
● Github: https://github.com/aabedraba
GitOps Testing in
Kubernetes with Flux
& Testkube
testkube.io
CI/CD Pipelines…. Let’s talk about them
CI/CD:
- unit tests
- container build
- container publish
- update deployment
configuration
- deploy your app to the
cluster
- reconciliation of cluster?
2023
GitOps have decoupled the CI/CD pipelines
CI:
- unit tests
- container build
- container publish
- update deployment
configuration
CD:
- deploy your app to the cluster
- reconciliation of cluster? yes!
2023
GitOps have decoupled the CI/CD pipelines
CI (PUSH):
- unit tests
- container build
- container publish
- update deployment
configuration
CD (PULL):
- deploy your app to the cluster
- reconciliation of cluster? yes!
2023
When and where do we run our tests?
- On application build
- On application deployment
- Compute intensive tests?
- On cluster reconciliation?
2023
Because of Testing, CI is still coupled to CD
- CI needs access to the cluster
- CI somehow needs to know the state of the cluster
- am I testing the new version of the app?
- is the cluster fully reconciled?
2023
Even more questions
- Re-running tests? (retrigger the entire pipeline?)
- Saving tests artifacts? (Cypress videos)
- Whose responsibility is this?
2023
Testing Tools are not build with K8s in mind
UI Testing
API Testing
Load Testing API Testing
2023
Testing Frameworks are not build with K8s in
mind
UI Testing
API Testing
Load Testing API Testing
2023
Testing Kubernetes applications is hard!
Solution is cloud native testing
● Scalability ● Flexibility ● Automation
2023
Introducing Testkube
● The Kubernetes-native testing framework
● Open source & CNCF Silver Member
● Test orchestration and running
2022 testkube.kubeshop.io
2023
Demo!
demo.testkube.io
Testing tools
+ More …!
bit.ly/testkube-executors
2023
Taking care of the heavy lifting 🏋
● No containerization needed
● Circumventing Restricted
environments.
● Artifact Storage
2022
● Scaling
● No complex scripts and code
boilerplate
● Simpler CI/CD pipelines
2023
Improved CI
2023
How can you run tests?
- On a schedule
- Manually via Testkube's CLI or Open Source
Dashboard
- Externally triggered via API
- Annotated/labeled Kubernetes objects
- Cluster events
2023
Test are Kubernetes Custom Resources
2022
2023
❤ Tests
github.com/kubeshop/
testkube
bit.ly/kubeshop-
discord
@Testkube_io
2022
Thank You!
Github: Discord: Тwitter:

GitOps Testing in Kubernetes with Flux and Testkube.pdf

  • 1.
    1 1 GitOps Testing inKubernetes with Flux & Testkube Abdallah Abedraba Developer Advocate, TestKube Stacey Potter Community Manager, Weaveworks
  • 2.
    2 2 Weaveworks is foundedon open source ● Flux & Flagger (CNCF): GitOps and Progressive Delivery for k8s 🎓 ● Weave GitOps: A powerful extension & web UI for Flux ● Weave GitOps Terraform Controller: Flux controller for Terraform resources ● GitOps Tools for Flux: VS Code extension weave.works
  • 3.
    3 3 Speakers Help/Support Abdallah Abedraba DeveloperAdvocate Testkube Stacey Potter Community Manager Weaveworks Duration 30-60 Minutes Browser Safari copy/paste shortcuts may not work Using Zoom Questions? • Use chat (button: top left corner of screen) • Escape to exit full screen • “To Everyone” or “To all panelists and attendees” Support: https://support.zoom.us/hc/ en-us/articles/206175806-T op-Questions Troubleshooting Use chat If the issue is not easily resolved, we ask that you follow along as we demo the sample app. GitOps Testing in Kubernetes with Flux & Testkube
  • 4.
    4 4 👋 Get Connected💬 🤝 ● Fluxcd.io - ⭐ Star us on GitHub ⭐ ● Check out the Flux docs at: fluxcd.io/docs/get-started/ ● CNCF Slack #Flux channel (or get a slack invite) ● Testkube.io ● Testkube on GitHub ● Testkube on Discord ● Testkube Docs
  • 5.
    5 5 Mar 9: CNCFon-demand webinar: Monolith Microservices with Bite-sized Kubernetes Mar 14: Building Internal Developer Platforms with EKS & GitOps Mar 15: CloudNative Live: Automating Kubernetes Deployments Mar 16: CNCF on-demand webinar: Kubernetes in 2023 Mar 23:VS Code Livestream: Automating Kubernetes Deployments Mar 30:How Flux & Pulumi Give Each Other Super Powers Upcoming Events
  • 6.
    6 ● GitOps isan app dev and operations methodology ● GitOps is a methodology, not a specific tool or technology. ● GitOps applies to everything and brings business value. What is GitOps? … and why do I want it?
  • 7.
    7 GitOps leverages: ● anentire system that is described declaratively ● code that is version controlled and ● software agents that reconcile and ensure correctness (along with alerts, etc). 4 Principles of GitOps
  • 8.
    8 Confidential do notdistribute 8 Demo Time!
  • 9.
    About me 2023 Abdallah Abedraba ●Developer Advocate at Testkube.io ● Background: DevRel, Software Engineer, Product ● Twitter: @aabedraba ● Github: https://github.com/aabedraba
  • 10.
    GitOps Testing in Kuberneteswith Flux & Testkube testkube.io
  • 11.
    CI/CD Pipelines…. Let’stalk about them CI/CD: - unit tests - container build - container publish - update deployment configuration - deploy your app to the cluster - reconciliation of cluster? 2023
  • 12.
    GitOps have decoupledthe CI/CD pipelines CI: - unit tests - container build - container publish - update deployment configuration CD: - deploy your app to the cluster - reconciliation of cluster? yes! 2023
  • 13.
    GitOps have decoupledthe CI/CD pipelines CI (PUSH): - unit tests - container build - container publish - update deployment configuration CD (PULL): - deploy your app to the cluster - reconciliation of cluster? yes! 2023
  • 14.
    When and wheredo we run our tests? - On application build - On application deployment - Compute intensive tests? - On cluster reconciliation? 2023
  • 15.
    Because of Testing,CI is still coupled to CD - CI needs access to the cluster - CI somehow needs to know the state of the cluster - am I testing the new version of the app? - is the cluster fully reconciled? 2023
  • 16.
    Even more questions -Re-running tests? (retrigger the entire pipeline?) - Saving tests artifacts? (Cypress videos) - Whose responsibility is this? 2023
  • 17.
    Testing Tools arenot build with K8s in mind UI Testing API Testing Load Testing API Testing 2023
  • 18.
    Testing Frameworks arenot build with K8s in mind UI Testing API Testing Load Testing API Testing 2023
  • 19.
  • 20.
    Solution is cloudnative testing ● Scalability ● Flexibility ● Automation 2023
  • 21.
    Introducing Testkube ● TheKubernetes-native testing framework ● Open source & CNCF Silver Member ● Test orchestration and running 2022 testkube.kubeshop.io 2023
  • 22.
  • 23.
    Testing tools + More…! bit.ly/testkube-executors 2023
  • 24.
    Taking care ofthe heavy lifting 🏋 ● No containerization needed ● Circumventing Restricted environments. ● Artifact Storage 2022 ● Scaling ● No complex scripts and code boilerplate ● Simpler CI/CD pipelines 2023
  • 25.
  • 26.
    How can yourun tests? - On a schedule - Manually via Testkube's CLI or Open Source Dashboard - Externally triggered via API - Annotated/labeled Kubernetes objects - Cluster events 2023
  • 27.
    Test are KubernetesCustom Resources 2022 2023 ❤ Tests
  • 28.