Skip to content

Commit

Permalink
Fork k8s-local to setup a k8s mgmt cluster for bootstrapping and mana…
Browse files Browse the repository at this point in the history
…ging other k8s clusters
  • Loading branch information
kzap committed Nov 18, 2021
1 parent 5c88a87 commit 0defe1b
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 87 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,27 @@ This sets up a local Kubernetes cluster using KinD (Kubernetes in Docker) and in
```sh
kubectl apply -k ./argocd
```

- Create `secret` to contain AWS Credentias (these credentials will have to be close to Admin as you need to create many AWS resources)

```sh
# Replace `[...]` with your access key ID`
export AWS_ACCESS_KEY_ID=[...]
# Replace `[...]` with your secret access key
export AWS_SECRET_ACCESS_KEY=[...]
# Create a temporary file to hold the credentials
echo "[default]
aws_access_key_id = $AWS_ACCESS_KEY_ID
aws_secret_access_key = $AWS_SECRET_ACCESS_KEY
" > ./aws-creds.conf
# Create a Kubernetes secret using this file
kubectl --namespace crossplane-system \
create secret generic aws-creds \
--from-file creds=./aws-creds.conf
# Delete this temp file
rm ./aws-creds.conf
```
2 changes: 1 addition & 1 deletion argocd/apps/argocd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
project: core-services
source:
path: argocd
repoURL: https://github.com/kzap/k8s-local.git
repoURL: https://github.com/kzap/k8s-mgmt-cluster.git
syncPolicy:
automated: {}
syncOptions: # Sync options which modifies sync behavior
Expand Down
2 changes: 1 addition & 1 deletion argocd/apps/crossplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
project: core-services
source:
repoURL: https://github.com/kzap/k8s-local.git
repoURL: https://github.com/kzap/k8s-mgmt-cluster.git
path: crossplane
helm:
valueFiles:
Expand Down
2 changes: 1 addition & 1 deletion argocd/apps/linkerd-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
project: core-services
source:
path: linkerd
repoURL: https://github.com/kzap/k8s-local.git
repoURL: https://github.com/kzap/k8s-mgmt-cluster.git
syncPolicy:
automated: {}
syncOptions: # Sync options which modifies sync behavior
Expand Down
2 changes: 1 addition & 1 deletion argocd/apps/linkerd-emojivoto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
project: default
source:
path: linkerd/emojivoto
repoURL: https://github.com/kzap/k8s-local.git
repoURL: https://github.com/kzap/k8s-mgmt-cluster.git
syncPolicy:
automated: {}
syncOptions: # Sync options which modifies sync behavior
Expand Down
2 changes: 1 addition & 1 deletion argocd/apps/nginx-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
project: core-services
source:
path: nginx-ingress
repoURL: https://github.com/kzap/k8s-local.git
repoURL: https://github.com/kzap/k8s-mgmt-cluster.git
syncPolicy:
automated:
prune: true
Expand Down
2 changes: 1 addition & 1 deletion crossplane/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
crossplane:
provider:
packages:
- "crossplane/provider-terraform:v0.1.2"
- "crossplane/provider-aws:v0.21.0"
4 changes: 2 additions & 2 deletions kind/v1.20-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ nodes:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
hostPort: 8080
protocol: TCP
- containerPort: 443
hostPort: 443
hostPort: 8443
protocol: TCP
4 changes: 2 additions & 2 deletions kind/v1.21-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ nodes:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
hostPort: 8080
protocol: TCP
- containerPort: 443
hostPort: 443
hostPort: 8443
protocol: TCP
25 changes: 0 additions & 25 deletions my-service/crossplane-terraform-repo.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions my-service/kustomization.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions my-service/ns.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions my-service/provider-config.yaml

This file was deleted.

0 comments on commit 0defe1b

Please sign in to comment.