Applications
Applications (a.k.a. apps) are a type of Kubernetes resource used by ArgoCD and KAOPS to deploy manifests from a Git Repo and Path.
To distribute an Application to one or more clusters, do the following in order:
- Declare your K8s manifests in Git, using YAML, Helm, Kustomize, JSONET, etc.
- Create an Application in KAOPS to point to it.
- Create a Distribution Rule in KAOPS to distribute that Application to the KAOPS clusters you choose.
Declare K8s resource manifests in Git
A KAOPS "Application" points to a Git Repo + Path that contains a any Kubernetes resource or set of Kubernetes resources:
- A single object (e.g. a Deployment or Service)
- A whole app or set of microservices (e.g. multiple Deployments or Services)
- Open Source Tool (e.g. KubeVirt, Istio)
- Closed source tool or app
- CRDs (Custom Resource Definitions)
- ConfigMaps or Secrets
- Infrastructure (e.g. Crossplane or Terraform)
- or any mix of the above
Here is a Git Repo and Path the contains the manifest for 'guestbook', to which you can point a KAOPS application. GitHub KAOPS Example App, Guestbook
Creating an Application in KAOPS
To create an Applicaiton in KAOPS, do one of the following:
- click on the "New -> Application" at the top of the page
- click on the "*" next to the Applications page in the left Nav bar
- click on the "Click to Create Application" at the top of the Application page
Complete the Application metadata form
The will result in following application card or list.
You can see above that the Application has not been distributed to any clusters. To distribute this applicaitons to a cluster, read on...
Distributing Apps with Rules
To distribute this application to a cluster, you must create a distribution rule.
To create a DIstribution Rule, do one of the following:
- click on the "New -> Distribution Rule" at the top of the page
- click on the "*" next to the Applications->Distribution Rules page in the left Nav bar
- click on the "Click to Create Distribution Rule" at the top of the Applications->Distribution Rules page
Create the following rule to disribute your Application tagged "hub" to your Cluster tagged "hub". This is a simple rule.
You can create whatever tags you want for both Clusters and Applications, and apply them through whatever rules you like. Some common tag strategies are:
- Use Enviromment tags for Clusters and Apps (e.g. "dev" and "prod")
- Use Environment tags for Clusters (e.g. "dev" and "prod") and Version tags for Apps (e.g. "v1" and "v2")
- Use Location tags (e.g. "core" and "edge or "aws-us-east-1" and "azure-us-east").
The will result in following application card or list.
You can also view the Apps by Cluster, and see that 'dev' and 'prod' clusters have no apps running.