-
Notifications
You must be signed in to change notification settings - Fork 350
Description
Expected Behavior
Tilt should be ignoring the kubernetes kube config if no k8s resources are in the Tiltfile
Current Behavior
20 second startup delay.
I noted that this has been fixed before. However, either the fix was undone or it's a slightly different scenario.
Either way, my Tiltfile doesn't reference kubernetes.
See: #5184
Steps to Reproduce
Create a ~/.kube/config and make the server address point to a cluster that doesn't exist.
My Tiltfile looks like:
> cat Tiltfile
docker_build('serverkit', '.', dockerfile="docker/frankenphp/Dockerfile", live_update=[
sync('./html', '/app/www/html'),
])
docker_compose('docker-compose.yaml')
Since this problem occurred while roaming with a local microk8s cluster, I found a workaround is to
alter my kube config file and change the server_address from https://192.168.167.207:16443
to https://127.0.0.1:16443
However, I would still have expected Tilt to ignore the cluster and it doesn't.
Context
tilt doctor
Output
> tilt doctor
Tilt: v0.33.22, built 2025-01-03
System: linux-amd64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: Error: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.46/version": context deadline exceeded
- API Version: Error: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.46/version": context deadline exceeded
- Builder: Error: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.46/version": context deadline exceeded
- Compose Version: v2.32.1
---
Kubernetes
- Env: microk8s
- Context: microk8s
- Cluster Name: microk8s-cluster
- Namespace: default
- Container Runtime: read-failure
- Version: Error: Get "https://192.168.167.214:16443/version": dial tcp 192.168.167.214:16443: i/o timeout
- Cluster Local Registry: none
---
Thanks for seeing the Tilt Doctor!
Please send the info above when filing bug reports. 💗
The info below helps us understand how you're using Tilt so we can improve,
but is not required to ask for help.
---
Analytics Settings
--> (These results reflect your personal opt in/out status and may be overridden by an `analytics_settings` call in your Tiltfile)
- User Mode: opt-in
- Machine: a7f8b6b7a4409acf726e04e4bfe16333
- Repo: uzIf4DZfcR098uK3ZYGRbA==
About Your Use Case
I am building a container that uses both Docker and Kubernetes. However the docker build is lighter on resources since I don't need to have kubernetes running and is just generally easier.
So I have two Tiltfiles. The main one defaults to Docker and is like the above and the second is for kubernetes.