DEV Community

Cover image for How to deploy Ingress with Tilt
Antoine
Antoine

Posted on

1

How to deploy Ingress with Tilt

Photo by Hello I'm Nik 🎞 on Unsplash

Tilt is an amazing tool to deploy easily services to your local kubernetes file.

But how to deploy ingress with tilt ?

Luckily, browsing tilt issues, i have found this github containing an example.

load('ext://namespace', 'namespace_create', 'namespace_inject')

namespace_create('ambassador')

k8s_yaml('ambassador-operator-crds.yaml')
k8s_yaml(namespace_inject('ambassador-operator-kind.yaml', 'ambassador'))
k8s_yaml('ingress-example.yaml')

k8s_resource('ambassador-operator', objects=[
    'ambassadorinstallations.getambassador.io:customresourcedefinition',
    'ambassador-operator:serviceaccount',
    'ambassador-operator:role',
    'ambassador-operator-cluster:clusterrole',
    'ambassador-operator:rolebinding',
    'ambassador-operator-cluster:clusterrolebinding',
    'static-helm-values:configmap',
    'ambassador:ambassadorinstallation',
])

k8s_resource(new_name='ingress', objects=['example-ingress'], resource_deps=['ambassador-operator'])
Enter fullscreen mode Exit fullscreen mode

It creates the namespace through a tilt plugin, and load the yaml resources that will be used using k8s_yaml.

It then creates the ambassador operator using k8s_resource. Please note that the : is used to split name from kind.

Finally, it create the ingress.

Hope this helps !

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay