Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pepabo/k8s-github-auth
https://github.com/pepabo/k8s-github-auth
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/pepabo/k8s-github-auth
- Owner: pepabo
- Created: 2019-02-21T00:22:34.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-14T02:00:10.000Z (over 1 year ago)
- Last Synced: 2024-06-20T06:42:43.850Z (7 months ago)
- Language: Go
- Size: 29.3 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# k8s-github-auth
webhook srever for kubernetes authentication
## Usage
Running k8s-github-auth with deployment:
```
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-github-auth
labels:
app: k8s-github-auth
spec:
replicas: 1
selector:
matchLabels:
app: k8s-github-auth
template:
metadata:
labels:
app: k8s-github-auth
spec:
containers:
- name: k8s-github-auth
image: rtakaishi/k8s-github-auth
ports:
- containerPort: 8443
---
apiVersion: v1
kind: Service
metadata:
name: k8s-github-auth-dev
namespace: kube-system
labels:
k8s-app: k8s-github-auth
spec:
selector:
app: k8s-github-auth
clusterIP: 10.96.0.20
ports:
- name: tcp
port: 8443
targetPort: 8443
protocol: TCP```
add option to kube-apiserver:
```
--authentication-token-webhook-config-file=/path/to/webhook_config.yaml
```webhook_config.yaml:
```yaml
---
apiVersion: v1
kind: Config
preferences: {}
clusters:
- cluster:
insecure-skip-tls-verify: true
server: http://10.69.0.20:8443/webhook
name: webhook
users:
- name: webhook
contexts:
- context:
cluster: webhook
user: webhook
name: webhook
current-context: webhook
```set credential:
```
$ kubectl config set-credentials test --token=tokentokentoken
```## Update Image
```
$ docker build -t rtakaishi/k8s-github-auth .
``````
$ docker push rtakaishi/k8s-github-auth
```