Skip to content

jmmclean/k8s-local-tilt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-local-tilt

Show how to incorporate Tilt with minikube to quickly spin up applications on a local Kubernetes cluster with ArgoCD.

Prerequisites

Though the links below are more specific for Mac, the Linux installation docs are in similar spaces.

Getting Started

After all the Prerequisites are installed, users can begin by starting up minikube!

> minikube start --cpus 4 --memory 16384

The above command will start up a Kubernetes cluster on your local docker with 4 CPUs and 16GB of memory. If your machine does not have these resources, you can change them to be more accomodating.

you may need to update your docker desktop resource allocation

With minikube running, you should be able to run the below command (from the root of this repository):

> tilt up

This will automatically install ArgoCD and make ArgoCD manage itself...pretty neat! Following the instructions on your terminal, you can view the Tilt dashboard by pressing the spacebar:

> tilt up
Tilt started on http://localhost:10350/
v0.30.10, built 2022-10-25

(space) to open the browser
(s) to stream logs (--stream=true)
(t) to open legacy terminal mode (--legacy=true)
(ctrl-c) to exit
Opening browser: http://localhost:10350/

Logging in to ArgoCD

With ArgoCD being installed by default when you tilt up, the UI is already being forwarded to https://localhost:8080. The credentials are below:

  • username: admin
  • password: <uniq per install...see image below>

Adding More Applications

By default, this repository contains argo-rollouts and argo-workflows, however they are not installed by default. We can easily add them by running the below command:

> tilt up -- --with argo

After logging into Argo, users should see a total of 3 applications being managed:

  • argo-cd
  • argo-workflows
  • argo-rollouts

To mutate any of these deployment configurations, users will want to test their changes my modifying the application.yml to have a targetRevision that is equal to your current branch, otherwise it will be looking at main. (ArgoCD Application manifest)

Be sure to push up your local branch!

Since Tilt is orchestrating all this work, users can view the source by navigating to the tiltfile. Specifically we can find the below code, which will automatically add some other applications via the group argo.

# define groups for --with command
groups = {
    "argo": [
        "argo-rollouts",
        "argo-workflows"
    ]
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published