https://github.com/cartyc/kcc-private-cluster
https://github.com/cartyc/kcc-private-cluster
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cartyc/kcc-private-cluster
- Owner: cartyc
- Created: 2021-07-30T13:16:21.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-27T12:53:19.000Z (almost 5 years ago)
- Last Synced: 2025-02-28T13:30:43.219Z (over 1 year ago)
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KCC SetUp
## Requirements
- [kpt](https://kpt.dev/installation/)
- [Docker](https://docs.docker.com/desktop/)
- [gcloud](https://cloud.google.com/sdk/docs/install)
0. Set some helpful vars.
```
CONFIG_CONTROLLER_NAME=kcc-control
```
1. SetUp Config Controller. Full setup can be found [here](https://cloud.google.com/anthos-config-management/docs/how-to/config-controller-setup)
```
gcloud services enable krmapihosting.googleapis.com \
container.googleapis.com \
cloudresourcemanager.googleapis.com
gcloud alpha anthos config controller create $CONFIG_CONTROLLER_NAME \
--location=us-central1
```
2. Switch to the config controller context
```
gcloud alpha anthos config controller get-credentials $CONFIG_CONTROLLER_NAME \
--location us-central1
```
3. Give Config Controller Access to create resources.
```
export PROJECT_ID=$(gcloud config get-value project)
export SA_EMAIL="$(kubectl get ConfigConnectorContext -n config-control \
-o jsonpath='{.items[0].spec.googleServiceAccount}' 2> /dev/null)"
gcloud projects add-iam-policy-binding "${PROJECT_ID}" \
--member "serviceAccount:${SA_EMAIL}" \
--role "roles/owner" \
--project "${PROJECT_ID}"
```
4. Pull the `kpt` package
```
kpt pkg get https://github.com/cartyc/kcc-private-cluster.git
```
5. Edit the `setters.yaml` file to set the required variables. Following that to apply the variables to the files run the below `kpt` function.
```
cd kcc-private-cluster
kpt fn render .
```
Finally apply the configs
```
kubectl apply -f infra/
```