https://github.com/stackzoo/client-go-examples
client-go examples and use cases 🐝
https://github.com/stackzoo/client-go-examples
client-go golang kubernetes
Last synced: 3 months ago
JSON representation
client-go examples and use cases 🐝
- Host: GitHub
- URL: https://github.com/stackzoo/client-go-examples
- Owner: stackzoo
- Created: 2023-04-14T08:06:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-14T08:09:25.000Z (about 2 years ago)
- Last Synced: 2025-03-26T13:11:16.971Z (3 months ago)
- Topics: client-go, golang, kubernetes
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLIENT-GO EXAMPLES
This repo contains go scripts that illustrate how to use client-go and other
k8s packages in order to call k8s api server programmatically.## Instructions
As an example you can first launch the deployment creation:
```console
❯ go run deployments/create_deployment.goDeployment created successfully!
```and then retrieve the pods metrics:
```console
❯ go run metrics/pods_metrics.goSHOWING PODS METRICS
pod name: busybox-58d9b8dbdc-b4x27
namespace: test
cpu usage (millicore): 416m
memory usage: 0Mipod name: busybox-58d9b8dbdc-glgjt
namespace: test
cpu usage (millicore): 436m
memory usage: 0Mipod name: busybox-58d9b8dbdc-wwbrp
namespace: test
cpu usage (millicore): 428m
memory usage: 0Mi
```