Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markhilton/kubernetes-deployment-patch
Simple bash script to build a tagged Docker image and re-deploy it on Kubernetes
https://github.com/markhilton/kubernetes-deployment-patch
bash bash-script deployment docker docker-image dockerfile environment-variables kubernetes kubernetes-deployment
Last synced: 15 days ago
JSON representation
Simple bash script to build a tagged Docker image and re-deploy it on Kubernetes
- Host: GitHub
- URL: https://github.com/markhilton/kubernetes-deployment-patch
- Owner: markhilton
- License: mit
- Created: 2018-05-08T14:47:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-08T15:11:29.000Z (almost 7 years ago)
- Last Synced: 2024-11-29T03:22:23.460Z (2 months ago)
- Topics: bash, bash-script, deployment, docker, docker-image, dockerfile, environment-variables, kubernetes, kubernetes-deployment
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubernetes Deployment Patch
Simple single bash command script to:1. build a tagged Docker image
2. push it into Docker repository
3. force Kubernetes rolling deployment within selected namespace## Assumptions
1. Docker image name is the same as Kubernetes deployment name.
2. `kubectl` is authorized to connect to Kubernetes cluster
3. If you're using Docker private repository - you're authorized already with `docker login`## Installation
1. Copy `build.sh` into your executable environment $PATH.*example:*
```
cp ./build.sh /usr/local/bin/build
```2. Add required environment variables listed in `.env` file into your project `.env` where `Dockerfile` is located
*example:*
```
cat ./env >> /path_to_your_project_where_Dockerfile_is_located/.env
```## Usage
```
build --help
```*examples:*
build a Docker image tagged as `latest` & push it into Docker repository:
```
build
```build a Docker image tagged as `1.0.0`, push it into Docker repository and patch Kubernetes deployment to use it in production namespace:
```
build 1.0.0 PROD
```