Deployment

Here is how to generate Kubernetes manifests from your service definition:

$ harness kube-gen python service.proto service.yaml v2020
                   ^----^ ^-----------^ ^----------^ ^---^
                     1          2            3         4
  1. Runtime’s name

  2. Configuration’s definition location

  3. Configuration’s runtime values

  4. Version

Additional options:

--instance

Instance of your deployment – app.kubernetes.io/instance, when you have to deploy several instances of your service into the same namespace

--namespace

Explicitly defines a namespace in the manifests

--secret-merge

Path to a YAML file with a secrets defined in the JSON Merge Patch format

--secret-patch

Path to a YAML file with a secrets defined in the JSON Patch format

--base-domain

If you have an output PUBLIC wire of harness.http.Server type, Harness also generates a routing config to accept ingress traffic from https://{service-name}.{base-domain} domain, where service-name comes from a (harness.service).name option value

Note

--instance option value is added as a suffix to the sub-domain

Kubectl

$ harness kube-gen {...args...} | kubectl apply -f -

Kustomize

$ harness kube-gen {...args...} > deployment.yaml
$ kubectl apply -k .