Deployment Considerations - yibinericxia/documents GitHub Wiki

Deployment Options

Rolling

Blue/Green

Canary

Cloud Deployment

Flux & Helm

Flux and Helm can be used to automate the deployment of containers to Kubernetes clusters. Each application may have its own yaml file like something below:

apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
meetadata:
  name: your-app-name
  namespace: your-ns
  annotations:
    fluxcd.io/automated: "false"
    filter.fluxcd.io/chart-image: semver:~0.4
spec:
  releaseName: your-app-name
  chart:
    git: [email protected]:repository.git
    path: /flux/helm/app
    ref: main
  values:
    ingress:
      host: company.domain.com
      tls:
        secret: your-secret-string
        certificateIssuer: your-cert-issuer-name

A simple ingress.yaml could be as follows:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ .Release.Name }}
  annotations:
    kubernetes.io/ingrerss.class: kong
spec:
  tls:
  - hosts:
      - {{ .Values.ingress.host }}
    secretName: {{ .Values.ingress.tls.secret }}
  rules:
  - host: {{ .Values.ingress.host }}
    http:
      paths:
      - path: /api/to/path
        pathType: Prefix
        backend:
          service:
            name: {{ .Release.Name }}
            port:
              number: {{ .Values.service.externalPort }}

with the helm chart value.yaml below:

ingress:
  host: company.domain.com
  tls:
    secret: your-secret-string
    certificateIssuer: your-cert-issuer-name
service:
  type: clusterIP
  externalPort: 8080
  internalPort: 8080

Please refer to Microservice Deployment and Design Considerations for more details.