forked from cncf/automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolving the issue cncf#10 Write clear documentation on how to test …
…GHA Config with a local KIND cluster Signed-off-by: Ryder-07 <[email protected]>
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Setting Up a Local KIND Cluster with GitHub Actions Integration | ||
|
||
This guide walks you through setting up a local KIND cluster and integrating it with GitHub Actions using the Actions Runner Controller (ARC). | ||
|
||
--- | ||
|
||
## Table of Contents | ||
|
||
##### Step 1: Set Up a Local KIND Cluster | ||
1. Install KIND: | ||
- Follow the installation guide from [KIND official documentation.](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) | ||
2. Create a Cluster | ||
```kind create cluster --name cncf-cluster``` | ||
##### Step 2: Configure GitHub Actions to Use KIND | ||
|
||
1. Set Up Runner: | ||
- Refer to the [ARC Work by @jeefy](https://github.com/jeefy/gha-runner) for setting up the Actions Runner Controller (ARC). | ||
|
||
2. Apply Cluster Configuration: | ||
- Navigate to the directory where your configuration files are located. | ||
- Apply the configuration: | ||
```kubectl apply -f path/to/your/configuration.yaml``` | ||
##### Step 3: Test GitHub Actions Configuration | ||
- Run a Workflow Locally: | ||
- Use the following command to run a GitHub Actions workflow locally: | ||
``` | ||
act -j your_workflow_job | ||
``` | ||
- Verify the Setup: | ||
- Ensure the runners are working as expected by checking the logs and the status of the pods: | ||
```kubectl get pods -n arc-systems ``` | ||
##### References | ||
- [GitHub Actions Runner Controller](https://github.com/actions/actions-runner-controller) | ||
- [Kubernetes KIND](https://kind.sigs.k8s.io/) | ||
##### Additional Resources | ||
- [Cluster Directory Overview](https://github.com/cncf/automation/blob/aa2b88357be3c5d815ef87fc68c4fda2e3f6076f/ci/cluster/README.MD#L1-L40) | ||
- [Autoscaler Deployment](https://github.com/cncf/automation/blob/aa2b88357be3c5d815ef87fc68c4fda2e3f6076f/ci/cluster/equinix/autoscaler/deployment.yaml#L51-L154) |