Start minikube with addons - minikube start --addons ingress,ingress-dns
Bootstrap services with Tilt:
$ cat Tiltfile
ip=str(local('minikube ip')).strip()
tld='{}.nip.io'.format(ip)
# Crudely patch host names to use TLD.
k8s_yaml_content = str(read_file('k8s.yaml'))
k8s_yaml_content = k8s_yaml_content.replace('.TLD', '.'+tld)
k8s_yaml(blob(k8s_yaml_content))Define your Kubernetes resources in the "k8s.yaml" file and use ".TLD" anywhere you want the nip.io TLD injected.
e.g.
$ cat k8s.yaml
[...]
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx
labels:
name: nginx
spec:
rules:
- host: nginx.TLD
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: nginx
port:
number: 80$ curl http://nginx.$(minikube ip).nip.io/
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
[...]