Skip to content

Use this repo as an example for organizing ytt templates within your application repo

License

Notifications You must be signed in to change notification settings

carvel-dev/ytt-starter-for-kubernetes

Overview

Use this repo as an example for organizing ytt templates for your application.

Directory structure

  • config/ contains files describing app configuration
  • config-env/ contains environment configuration files
  • Dockerfile

Instructions

  1. Obtain and target a Kubernetes Cluster.

  2. Deploy the application to the cluster:

    $ ytt -f config/ -f config-env/production.yml | kubectl apply -f -
    deployment.apps/greeter created
    service/greeter created
    configmap/greeter created

    Note: The values from config/ are applied first and the production values from config-env/ will override them.

  3. Forward local traffic to the cluster in order to visit the app:

    $ kubectl port-forward service/greeter 8080:8080
    Forwarding from 127.0.0.1:8080 -> 80
    Forwarding from [::1]:8080 -> 80
  4. Verify the deployment

    $ curl localhost:8080/app/

About

Use this repo as an example for organizing ytt templates within your application repo

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published