https://github.com/rubenv/kube-appdeploy
https://github.com/rubenv/kube-appdeploy
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/rubenv/kube-appdeploy
- Owner: rubenv
- License: mit
- Created: 2016-06-17T14:00:57.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-03T09:44:11.000Z (almost 8 years ago)
- Last Synced: 2025-04-02T06:43:13.287Z (over 1 year ago)
- Language: Go
- Size: 41 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kube-appdeploy
Work-in-progress deployment tool for Kubernetes-hosted applications.
## Getting started
First build the command line client. Make sure kubectl is available on your path and a cluster is running.
go install github.com/rubenv/kube-appdeploy/bin/kube-appdeploy
The examples folder contains .yaml files to deploy nginx on your cluster. To do just that, run:
kube-appdeploy ./example/
The appdeploy script will pick up all .yaml files in the folder and process these.
You can use [text/template](https://godoc.org/text/template) syntax to change the computed content of the deploy configuration.
This example deploys 2 nodes in production and 1 node in all other environments:
```yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: my-nginx
spec:
{{ if eq .Variables.env "production" }}
replicas: 2
{{ else }}
replicas: 1
{{ end }}
template:
metadata:
labels:
run: my-nginx
spec:
containers:
- name: my-nginx
image: nginx
ports:
- containerPort: 80
```
The "env" variable is set in "variables.yaml" in yaml syntax as shown here:
```yaml
env: "development"
```