In the rancher-ui i am able to deploy a new workload and add a L7 ingress (test.example.com, including certificate). That works like a charm and the needed services (service-discovery) are created automatically.
Is there a way to create the example above with kubectl and yaml-files? As the L7 ingress is rancher-specific i think it won’t be able to configure it through kubernetes-yaml-syntax and needs some special keywords or annotatons?
The deployment of new pods or creating services/ingresses is working but i am not sure how to configure the L7 ingress or what to do that it picks up the change and does its magic.
Alright, i think i just found the solution shortly after i’ve created the thread.
It seems, that the magic happens when using labels and selectors on the ingress and service.
i hope my example will help someone out in the same situation
You can even use the ingress-manifest to get a certificate from let’s encrypt. The cert-manager will pick up the “tls” keyword and automatically request and install the certificate.
[me@host~] kubectl create -f demo-deployment.yaml -f demo-service.yaml -f demo-ingress.yaml
deployment.extensions/demo created
service/demo created
ingress.extensions/demo-lb created
As you have noted, this is just regular K8s, nothing Rancher specific (nor should there be). You might want to consider consolidating your separate yaml files into one (use the 3 dash separator between each resource type) for easier management and for reasons of cohesion I suppose.