Skip to content

gen-helloworld.sh script

gen-helloworld.sh is a utility script provided within the [[helloworld-service|Helloworld service]] sample to generate Kubernetes Resource Manifests dynamically^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__helloworld__README.md].

It is designed to offer greater flexibility than the standard helloworld.yaml file, allowing users to define the service version and specify which resources (Service or Deployment) should be included in the output^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__helloworld__README.md].

Usage

The script generates YAML configuration which can be piped directly into kubectl for deployment^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__helloworld__README.md].

Example command:

./gen-helloworld.sh --version customversion | [kubectl](<./kubectl.md>) apply -f -

Arguments

The script accepts the following command-line arguments^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__helloworld__README.md]:

Argument Default Description
--version v1 Specifies the version string that the helloworld service will return when called.
--includeService true Determines if the Kubernetes Service definition is included in the generated output.
--includeDeployment true Determines if the Kubernetes Deployment definition is included in the generated output.

Sources