From 34e5ffe614437c43d184a72c98f9ee665f27ab95 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 15 Jan 2021 02:34:53 +0800 Subject: [PATCH] [bugfix] works --- devel/k3s/traefik-dpy-cf.yaml | 11 +++---- devel/k3s/whomai-cf.yaml | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 devel/k3s/whomai-cf.yaml diff --git a/devel/k3s/traefik-dpy-cf.yaml b/devel/k3s/traefik-dpy-cf.yaml index 8295d98..62e8bd5 100644 --- a/devel/k3s/traefik-dpy-cf.yaml +++ b/devel/k3s/traefik-dpy-cf.yaml @@ -4,15 +4,16 @@ metadata: name: traefik spec: ports: - #- protocol: TCP - #name: web - #port: 80 +# - protocol: TCP +# name: web +# port: 80 #- protocol: TCP #name: admin #port: 8080 - protocol: TCP name: websecure port: 8443 + targetPort: 443 type: LoadBalancer selector: app: traefik @@ -57,9 +58,9 @@ spec: - --certificatesresolvers.myresolver.acme.email={EMAIL} - --certificatesresolvers.myresolver.acme.storage=acme.json env: - - name: CF_API_EMAIL + - name: CLOUDFLARE_EMAIL value: {CF_API_EMAIL} - - name: CF_API_Key + - name: CLOUDFLARE_API_KEY value: {CF_API_KEY} ports: - name: web diff --git a/devel/k3s/whomai-cf.yaml b/devel/k3s/whomai-cf.yaml new file mode 100644 index 0000000..f39d634 --- /dev/null +++ b/devel/k3s/whomai-cf.yaml @@ -0,0 +1,55 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: gitea + namespace: default +spec: + entryPoints: + - websecure + # - web + routes: + - match: Host(`example.com`) + kind: Rule + services: + - name: whoami + port: 80 + tls: + certResolver: myresolver +--- +apiVersion: v1 +kind: Service +metadata: + name: whoami + +spec: + ports: + - protocol: TCP + name: web + port: 80 + selector: + app: whoami +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + namespace: default + name: whoami + labels: + app: whoami + +spec: + replicas: 2 + selector: + matchLabels: + app: whoami + template: + metadata: + labels: + app: whoami + spec: + containers: + - name: whoami + image: traefik/whoami + ports: + - name: web + containerPort: 80