~johnhamelink/k8s-organice

64f613890683bd58de3b0427919930892d684aa6 — John Hamelink 7 months ago
Implement Kubernetes configuration for Organice
4 files changed, 66 insertions(+), 0 deletions(-)

A deployment.yml
A ingress.yml
A load-balancer.yml
A service.yml
A  => deployment.yml +21 -0
@@ 1,21 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: organice
spec:
  replicas: 1
  selector:
    matchLabels:
      name: organice
  template:
    metadata:
      labels:
        name: organice
    spec:
      containers:
      - name: organice
        imagePullPolicy: Always
        image: twohundredok/organice:latest
        ports:
          - containerPort: 5000

A  => ingress.yml +13 -0
@@ 1,13 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: organice-ingress
spec:
  rules:
  - host: org.johnhame.link
    http:
      paths:
      - path: /
        backend:
          serviceName: organice
          servicePort: 5000

A  => load-balancer.yml +20 -0
@@ 1,20 @@
apiVersion: v1
kind: Service
metadata:
  name: nginx-ingress
  namespace: kube-system
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
spec:
  type: LoadBalancer
  ports:
  - port: 80
    name: http
    targetPort: 80
  - port: 443
    name: https
    targetPort: 443
  selector:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx

A  => service.yml +12 -0
@@ 1,12 @@
---
apiVersion: v1
kind: Service
metadata:
  name: organice
spec:
  ports:
  - name: http
    port: 80
    targetPort: 5000
  selector:
    name: organice