ソースを参照

update traefik kubernetes templates

Christian Lempa 1 年間 前
コミット
6288d0faa2

+ 22 - 0
kubernetes/examples/example-deployment.yaml

@@ -0,0 +1,22 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: example-deployment
+  namespace: your-namespace
+  labels:
+    app: example-app
+spec:
+  replicas: 3  # how many pods?
+  selector:
+    matchLabels:
+      app: example-app
+  template:
+    metadata:
+      labels:
+        app: example-app
+    spec:
+      containers:
+      - name: nginx
+        image: nginx:latest
+        ports:
+        - containerPort: 80

+ 12 - 0
kubernetes/examples/example-service.yaml

@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: example-service
+  namespace: your-namespace
+spec:
+  selector:
+    app.kubernetes.io/name: MyApp
+  ports:
+    - protocol: TCP
+      port: 80
+      targetPort: 9376

+ 7 - 7
kubernetes/portainer/values.yml

@@ -14,13 +14,13 @@ service:
   # type: ClusterIP
 
 # (Optional) Add Ingress, when using ClusterIP
-# ingress:
-#   enabled: true
-#   hosts:
-#     - host: "portainer-test-1.kube-prod-2.home.clcreative.de"
-#       paths: 
-#         - path: "/"
-#           port: "9000"
+ingress:
+  enabled: true
+  hosts:
+    - host: "portainer-test-1.kube-prod-2.home.clcreative.de"
+      paths: 
+        - path: "/"
+          port: "9000"
 # -- end
 
 persistence:

+ 20 - 0
kubernetes/traefik/examples/example-ingressroute.yaml

@@ -0,0 +1,20 @@
+apiVersion: traefik.io/v1alpha1
+kind: IngressRoute
+metadata:
+  name: ingressroute
+  # (Optional) Namespace
+  # namespace: your-namespace
+  # ---
+spec:
+  entryPoints:
+  - web
+  - websecure
+  routes:
+  - match: Host(`your-hostname`)
+    kind: Rule
+    services:
+    - name: your-service
+      port: 80
+  # (Optional) TLS
+  # tls:
+  #   secretName: your-tls-secret

+ 1 - 1
kubernetes/traefik/examples/example-ingressroutetcp.yml

@@ -1,4 +1,4 @@
-apiVersion: traefik.containo.us/v1alpha1
+apiVersion: traefik.io/v1alpha1
 kind: IngressRouteTCP
 metadata:
   name: ingressroutetcp