https://github.com/summerwind/spire-plugin-datastore-k8s
Kubernetes datastore plugin for SPIRE server
https://github.com/summerwind/spire-plugin-datastore-k8s
golang kubernetes spiffe spire
Last synced: over 1 year ago
JSON representation
Kubernetes datastore plugin for SPIRE server
- Host: GitHub
- URL: https://github.com/summerwind/spire-plugin-datastore-k8s
- Owner: summerwind
- License: apache-2.0
- Created: 2019-05-05T05:09:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-11T02:40:15.000Z (about 7 years ago)
- Last Synced: 2024-06-20T06:26:49.561Z (about 2 years ago)
- Topics: golang, kubernetes, spiffe, spire
- Language: Go
- Size: 82 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubernetes datastore plugin for SPIRE server
A SPIRE datastore plugin that enables you to store data using Kubernetes Custom Resource.
## Motivation
- Make running SPIRE Server on Kubernetes simpler
- Enables SPIRE Server to run without managing persistent volumes
## Installation
Download latest binary and install it to the plugin directory.
```
$ curl -L -O https://github.com/summerwind/spire-plugin-datastore-k8s/releases/latest/download/spire-plugin-datastore-k8s-linux-amd64.tar.gz
$ tar zxvf spire-plugin-datastore-k8s-linux-amd64.tar.gz
$ mv spire-plugin-datastore-k8s /path/to/plugin
```
## Configuration
The plugin accepts the following configuration options:
| Configuration | Description |
| --- | --- |
| namespace | Kubernetes namespace to manage custom resources |
| kubeconfig | Path to configuration file to access kubernetes API |
A sample configuration for SPIRE server:
```
plugins {
DataStore "k8s" {
plugin_cmd = "/path/to/plugin"
plugin_data {
namespace = "spire"
}
}
}
```
## Deploying to Kubernetes
You must create *CustomResourceDefinition (CRD)* resources in your Kubernetes cluster before you deploy the plugin. Create CRDs as follows:
```
$ curl -L https://github.com/summerwind/spire-plugin-datastore-k8s/releases/latest/download/crd.yaml | kubectl apply -f -
```
In addition, the Pod of the SPIRE server must have permissions to manage the resources of the CRDs you created. See example manifest below for more information about permissions.
- [spire-server.yaml](manifests/examples/spire-server.yaml)
## Build from soruce
To build a binary from source, first build the container image and get the binary from it.
```
$ git clone https://github.com/summerwind/spire-plugin-datastore-k8s
$ cd spire-plugin-datastore-k8s
$ docker build --target release -t plugin:latest .
$ docker create -n spire plugin:latest
$ docker cp spire:/opt/spire/bin/spire-plugin-datastore-k8s ./
$ docker rm spire
```