https://github.com/zkfmapf123/k8s-github-action
github-action use k8s
https://github.com/zkfmapf123/k8s-github-action
Last synced: 5 months ago
JSON representation
github-action use k8s
- Host: GitHub
- URL: https://github.com/zkfmapf123/k8s-github-action
- Owner: zkfmapf123
- Created: 2025-06-14T10:48:45.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-15T14:42:11.000Z (about 1 year ago)
- Last Synced: 2025-09-05T20:03:26.989Z (10 months ago)
- Size: 350 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# K8S Github Action Runners
## ...
- [x] Github Action use K8S
- [ ] 요청 시 Action Pod / Node Scale-out
- [ ] Github Action 병렬처리
- [ ] Karpenter 깊게 이해하기
- [ ] Github Action 요청이 많을때 자체적으로 Action 이 늘어날순없을까? ( Action : Pod = 1: 1 )
- [ ] Action Deployment를 Replica를 늘리면 Karpenter가 자체적으로 늘어나게 할 수 있을까?
## Environments
- EKS
- Node Spec (t3.small)
- 2 CPU
- 2 MEM
- Karpenter
## Namespace / Secret 생성
```sh
kubectl create namespace action
kubectl create secret generic github-runner-secret \
--namespace action \
--from-literal=token=YOUR_GITHUB_TOKEN
```
## Karpetner 설정
- ttlSecondsAfterEmpty: 30 ## 인스턴스가 비워지면 30초후 삭제
## 설정방법 (Action Runner)



- Secret에 토큰 저장하기


## Trouble Shooting...
### EC2 Node Issue
- Node Status가 NotReady
- EC2 Instance Profile이 없어서 -> Kubelet이 EKS Control Plane에 접근 불가
- InstanceProfile을 직접 지정


```sh
## karpenter log 분석
kubectl -n karpenter logs deployment/karpenter
## karpenter.yaml
provider:
instanceProfile: eks-karpenter-action-instance-profile
```
### EC2 NodePool 없음 (진행 중)
- 6개의 노드가 실패 후 -> karpenter가 nodeclaim을 기준으로 노드를 생성하려고 시도
```sh
Warning FailedScheduling 14s default-scheduler 0/6 nodes are available: 6 Insufficient cpu. preemption: 0/6 nodes are available: 6 No preemption victims found for incoming pod.
Normal Nominated 13s karpenter Pod should schedule on: nodeclaim/default-tn8fg
```
- k describe nodeclaims.karpenter.sh

- nodeClaim 에 구성된 노드가 EKS 클러스터에 join 되지 않았음 (Node not registerd with cluster)
- nodeClaim으로 구성된 Ec2에 들어가서 보면 아래와 같은 에러가 발생하고 있음
```sh
1498 csi_plugin.go:887] Failed to contact API server when waiting for CSINode publishing: Unauthorized
```