Difference between revisions of "Kubernetes/Tilt"
Jump to navigation
Jump to search
(Created page with "= Install = <source lang=bash> VERSION=$(curl --silent "https://api.github.com/repos/tilt-dev/tilt/releases/latest" | jq -r .tag_name | tr -d "v"); echo $VERSION TEMPDIR=$(mkt...") |
|||
Line 6: | Line 6: | ||
sudo mv $TEMPDIR/tilt /usr/local/bin | sudo mv $TEMPDIR/tilt /usr/local/bin | ||
</source> | </source> | ||
= [https://docs.tilt.dev/helm.html Develop Helm charts] = | |||
<source lang=yaml> | |||
# Tiltfile | |||
k8s_yaml(helm('charts/myservice', values='env/mydev-values.yaml')) | |||
docker_build('myservice', '.') | |||
</source> | |||
= Operations = | |||
<source lang=bash> | |||
minikube start # tilt will deploy to the current kubectl context | |||
tilt up # press [s] to stream logs to the console rather than to open UI | |||
tilt down | |||
</source> | |||
{{Note | Tilt prefix all Kubernetes objects with <code>chart-</code>, eg. <code>deployment.apps/chart-myservice</code> }} |
Revision as of 20:02, 18 January 2021
Install
VERSION=$(curl --silent "https://api.github.com/repos/tilt-dev/tilt/releases/latest" | jq -r .tag_name | tr -d "v"); echo $VERSION TEMPDIR=$(mktemp -d) curl -fsSL https://github.com/tilt-dev/tilt/releases/download/v$VERSION/tilt.$VERSION.linux.x86_64.tar.gz | tar -xzv --directory $TEMPDIR tilt sudo mv $TEMPDIR/tilt /usr/local/bin
Develop Helm charts
# Tiltfile k8s_yaml(helm('charts/myservice', values='env/mydev-values.yaml')) docker_build('myservice', '.')
Operations
minikube start # tilt will deploy to the current kubectl context tilt up # press [s] to stream logs to the console rather than to open UI tilt down
Note: Tilt prefix all Kubernetes objects with chart-
, eg. deployment.apps/chart-myservice