https://github.com/carvel-dev/ytt-starter-for-kubernetes
Use this repo as an example for organizing ytt templates within your application repo
https://github.com/carvel-dev/ytt-starter-for-kubernetes
carvel ytt
Last synced: 11 months ago
JSON representation
Use this repo as an example for organizing ytt templates within your application repo
- Host: GitHub
- URL: https://github.com/carvel-dev/ytt-starter-for-kubernetes
- Owner: carvel-dev
- License: apache-2.0
- Created: 2020-05-13T17:42:35.000Z (about 6 years ago)
- Default Branch: develop
- Last Pushed: 2023-01-23T18:28:31.000Z (over 3 years ago)
- Last Synced: 2025-01-03T18:13:13.734Z (over 1 year ago)
- Topics: carvel, ytt
- Language: HTML
- Homepage:
- Size: 23.4 KB
- Stars: 8
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Overview
Use this repo as an example for organizing [ytt](https://get-ytt.io) 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.
1. Deploy the application to the cluster:
```console
$ 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.
1. Forward local traffic to the cluster in order to visit the app:
```console
$ kubectl port-forward service/greeter 8080:8080
Forwarding from 127.0.0.1:8080 -> 80
Forwarding from [::1]:8080 -> 80
```
1. Verify the deployment
```console
$ curl localhost:8080/app/
```