Anyone created ingress controllers in EKS through ...
# aws
s
Anyone created ingress controllers in EKS through pulumi? If you have any useful documentation that can help along the way, do drop them in the comments!
s
Ingress as in
new k8s.networking.v1.Ingress
?
This is an ingress using the ingress-nginx chart.
Copy code
let ingress = new k8s.networking.v1.Ingress(ingressName, {
            apiVersion: "<http://networking.k8s.io/v1|networking.k8s.io/v1>",
            kind: "Ingress",
            metadata: {
                name: ingressName,
                namespace: this.namespaceName,
                annotations: {
                    '<http://kubernetes.io/ingress.class|kubernetes.io/ingress.class>': 'nginx',
                    '<http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>': '/$2',
                    // '<http://cert-manager.io/cluster-issuer|cert-manager.io/cluster-issuer>': this.clusterIssuerName,
                },
            },
            spec: {
                tls: [{
                    hosts: [
                        `${this.args.dnsHostname}.${this.args.dnsDomain}`,
                    ],
                    secretName: this.tlsSecretName,
                }],
                rules: [{
                    host: `${this.args.dnsHostname}.${this.args.dnsDomain}`,
                    http: {
                        paths: [{
                            path: `${urlPath}(/|$)(.*)`,
                            pathType: 'Prefix',
                            backend: {
                                service: {
                                    name: serviceName,
                                    port: {
                                        number: 8080,
                                    }
                                }
                            },
                        }],
                    },
                }],
            },
        }, { parent: this.namespace, provider: this.cluster.provider, dependsOn: [this.chartIngressNginx, this.tlsSecret, service], deleteBeforeReplace: true });
        return ingress;