The goal for this is to setup a local env with a few tools like an ingress controller deployed with helm and hello world app
- Add a helm chart to the helm folder. I have added a stable folder too to indecate the state of the chart, this allows you to the have an incubator or test folder too.
- Each demo app has its own folder and there is a Tiltfile located in there ... as well as a main Tiltfile at the root of this repo
- kind:
v0.8.1
- tilt:
v0.13.4
- In the main Tiltfile there is a group of settings objects
settings
is used to select what base infra to deploy, such as metallb, ambassador, valut, consul, etcdemo_settings
is used to select what demo app you want to deploy
- note that helm tempates are converted into yaml and a kubectl apply is run on the yaml object, ie
helm ls
will not show anything - note this Tiltfile assumes that you are running a local docker regestriy that is setup by this kind start script
- Navigate to the root of this repo after you have cloned it and run
tilt up
- NOTE you can Start without hud, web gui, and watching your files
tilt up --hud=false --no-browser --watch=false
- NOTE you can Start without hud, web gui, and watching your files
- Either navigate to the root of this repo, or
ctr x
out of the tilt consule, and runtilt down
- get ingess ip
kubectl get svc --namespace ambassador ambassador -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
- if running ambassador edge stack
https://SERVICE_IP/edge_stack_admin/#dashboard
- get ingess ip
INGRESS_IP=$(kubectl get svc --namespace ambassador ambassador -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
- check the quote :)
curl -k https://${INGRESS_IP}/quote/ { "server": "cavernous-grapefruit-wqjnlbct", "quote": "A small mercy is nothing at all?", "time": "2020-02-04T15:21:55.1482125Z" }
- This demo builds the code located in the
basic-ingress/src
folder with the Dockerfile located inbasic-ingress/
- Once the docker build is completed, Tilt will push the image into KIND, and deploy to k8s based on the files located in
basic-ingress/k8s
- get ingess ip
INGRESS_IP=$(kubectl get svc --namespace ambassador ambassador -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
- check the basicingress :)
curl -k https://${INGRESS_IP}/basicingress/ <!DOCTYPE html> <html> <head> <title>Basic Ingress Demo</title> </head> <body> <p>The data today is 04-02-2020</p> <p>The time right now is 15:30:03</p> <p>The pod IP is 10.244.3.5</p> </body>
- If you are having issues with local ingress on Mac OS, please look at this: k8s-kind Troubleshooting
- If local docker builds are working, but tilt builds are failing. Try to build the image with the following:
$ tilt docker build .
Running Docker command as:
DOCKER_BUILDKIT=1 docker build .
---
...
- If it still failed, you may need to
export BOCKER_BUILDKIT=0
- kind installed
- Helm Quickstart
- tilt installed
- ambassador
- metallb
- linux vm
- docker installed, as well as the ability to pull images from the internet
- kind installed
- If you want a kind quick start you can look at my other repo: k8s-kind
- k8s tools (kubectl, helm 3 or greater)
- tilt installed