https://github.com/brucemacd/caddy-ssh-key-validation
https://github.com/brucemacd/caddy-ssh-key-validation
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/brucemacd/caddy-ssh-key-validation
- Owner: BruceMacD
- Created: 2023-04-10T16:42:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-12T16:01:23.000Z (over 3 years ago)
- Last Synced: 2025-04-01T21:57:17.646Z (over 1 year ago)
- Language: Go
- Size: 91.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Building and Deploying
```
docker buildx build --build-arg CACHEBUST=$(date +%s) --tag /keypair-agent:dev .
docker pull /keypair-caddy:dev
```
# Setup Kubernetes Cluster
Create cluster role bindings for your expected users.
Update `kubernetes/mapping.yaml` to map these users to their corresponding public SSH keys.
```
kubectl apply -f kubernetes/mapping.yaml
kubectl apply -f kubernetes/service-account.yaml
kubectl apply -f kubernetes/secret.yaml
kubectl apply -f kubernetes/deployment.yaml
kubectl apply -f kubernetes/service.yaml
```
# Getting Certificate Authority Data
Caddy automatically generates a certificate. You'll need to retrieve it set it in your Kubernetes configuration file.
```
$ kubectl get pods -l app=keypair-agent
$ kubectl cp :data/caddy/certificates/local/localhost/localhost.crt localhost.crt
$ base64 -i localhost.crt
# add this value to your Kubernetes config
```