Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Nginx-Ingress without Service supported? #42

Open
triplem opened this issue Oct 5, 2016 · 1 comment
Open

Nginx-Ingress without Service supported? #42

triplem opened this issue Oct 5, 2016 · 1 comment

Comments

@triplem
Copy link

triplem commented Oct 5, 2016

I am currently trying to setup a small bare-metal one-node "cluster". For this I would like to use kube-lego. I have read the docs, but up until now, kube-lego is starting and then halting after

2016-10-05T20:24:41.039507691Z time="2016-10-05T20:24:41Z" level=info msg="server listening on http://:8080/" context=acme

I am using the "usual" nginx-ingress controller, but without a service (like found in your example). The config looks like:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{template "fullname" . }}
spec:
  replicas: 1
  template:
    metadata:
      labels:
        # Required for the auto-create kube-lego-nginx service to work.
        app: "{{ .Chart.Name }}"
    spec:
      containers:
      - name: kube-lego
        image: jetstack/kube-lego:canary
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
        env:
        - name: LEGO_KUBE_API_URL
          value: http://lego.xxx.yyy:32767
        - name: LEGO_EMAIL
          valueFrom:
            configMapKeyRef:
              name: {{template "fullname" . }}
              key: lego.email
        - name: LEGO_URL
          valueFrom:
            configMapKeyRef:
              name: {{template "fullname" . }}
              key: lego.url
        - name: LEGO_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: LEGO_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 5
          timeoutSeconds: 1

My ingress is configured quite similar to the one found in your examples:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: {{ template "fullname" . }}
  labels:
    app: "{{ .Chart.Name }}"
annotations:
  kubernetes.io/tls-acme: "true"
spec:
  tls:
  - secretName: {{ .Chart.Name }}-tls
    hosts:
    - {{ .Values.hostName }}
  rules:
  - host: {{ .Values.hostName }}
    http:
      paths:
      - path: /
        backend:
          serviceName: {{ template "fullname" . }}
          servicePort: 80

For http, everything is working fine and now I would like to setup https. Any help on this one?

This is more of a support request, then a bug, I know, but I was unsure how to reach you.

@triplem triplem changed the title Update Documentation Nginx-Ingress without Service supported? Oct 5, 2016
@simonswine
Copy link
Contributor

Can you try to use version 0.1.3 and set the env variable LEGO_LOG_LEVEL=debug.

It might be a good idea to not set a custom LEGO_KUBE_API_URL. Not too sure why this is needed in your case...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants