https://github.com/ductnn/kugo
Cli tool for Kubernetes
https://github.com/ductnn/kugo
client-go golang kubernetes
Last synced: about 2 months ago
JSON representation
Cli tool for Kubernetes
- Host: GitHub
- URL: https://github.com/ductnn/kugo
- Owner: ductnn
- Created: 2021-08-15T11:03:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-16T18:09:35.000Z (almost 5 years ago)
- Last Synced: 2025-07-21T04:27:18.389Z (11 months ago)
- Topics: client-go, golang, kubernetes
- Language: Go
- Homepage: https://ductn.info/controller-kubernetes-with-golang-2/
- Size: 950 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
title: kugo
---
# Kubernetes client-go sample
* **Kugo**: Một chiếc `cli tool` nho nhỏ dành cho kubernetes sử dụng thư viện
[client-go](https://github.com/kubernetes/client-go).
* **Kugo** giúp bạn `update image` của ứng dụng đang triển khai.
## Pre-Install
* Cài đặt `Golang`
* Cụm kubernetes để triển khai
## Install
```bash
git clone https://github.com/ductnn/kugo.git
cd kugo
go build main.go
```
## Usage
* Sau khi `build` chương trình sinh ra file `main`, và để sử dụng cần truyền
vào các `arguments` sau:
* `-deployment name:`: Tên của `deployment` đang chạy.
* `-app name:`: Tên của ứng dụng đang chạy (default: `app`).
* `-image name:`: Tên image mới cần deploy.
* `-kubeconfig string`: Đường dẫn file `kubeconfig` (default: `/home/(userid)/.kube/config`)
```bash
➜ kugo git:(master) ✗ ./main -deployment test-app -image ductn4/green-rain:v1 -app test-app
```
## Example
* Mình đang chạy `deployment` có tên là `test-app` và sử dụng `image: ductn4/green-rain:v1`,
và bây giờ mình thay đổi phiên bản `image` đang dùng thành `image: ductn4/green-rain:v2`
```bash
➜ kugo git:(master) ✗ ./main -deployment test-app -image ductn4/green-rain:v2 -app test-app
/home/ductn/.kube/config
Found deployment
name -> test-app
Old image -> ductn4/green-rain:v1
New image -> ductn4/green-rain:v2
```
[me](https://ductn.info/about)