|
| 1 | +Kubernetes node bootstrap token manager |
| 2 | +======================================== |
| 3 | + |
| 4 | +[](https://github.com/webdevops/kube-bootstrap-token-manager/blob/master/LICENSE) |
| 5 | +[](https://hub.docker.com/r/webdevops/kube-bootstrap-token-manager/) |
| 6 | +[](https://hub.docker.com/r/webdevops/kube-bootstrap-token-manager/) |
| 7 | + |
| 8 | +Manager for Node bootstrap tokens for Kubernetes. |
| 9 | + |
| 10 | +Supports currently Azure cloud provider (more cloud provider support -> please submit PR). |
| 11 | + |
| 12 | +Azure: |
| 13 | +- Stores token in Keyvault as secret |
| 14 | +- (re)creates token inside Kubernetes and ensures it existence |
| 15 | +- Manages renewal if token is going to be expired |
| 16 | + |
| 17 | +Configuration |
| 18 | +------------- |
| 19 | + |
| 20 | +``` |
| 21 | +Usage: |
| 22 | + kube-bootstrap-token-manager [OPTIONS] |
| 23 | +
|
| 24 | +Application Options: |
| 25 | + --debug debug mode [$DEBUG] |
| 26 | + -v, --verbose verbose mode [$VERBOSE] |
| 27 | + --log.json Switch log output to json format [$LOG_JSON] |
| 28 | + --bootstraptoken.name= Name for bootstrap tokens (default: bootstrap-token-%s) [$BOOTSTRAPTOKEN_NAME] |
| 29 | + --bootstraptoken.label= Label for bootstrap tokens (default: webdevops.kubernetes.io/bootstraptoken-managed) [$BOOTSTRAPTOKEN_LABEL] |
| 30 | + --bootstraptoken.namespace= Namespace for bootstrap tokens (default: kube-system) [$BOOTSTRAPTOKEN_NAMESPACE] |
| 31 | + --bootstraptoken.type= Type for bootstrap tokens (default: bootstrap.kubernetes.io/token) [$BOOTSTRAPTOKEN_TYPE] |
| 32 | + --bootstraptoken.usage-bootstrap-authentication= Usage bootstrap authentication for bootstrap tokens (default: true) [$BOOTSTRAPTOKEN_USAGE_BOOTSTRAP_AUTHENTICATION] |
| 33 | + --bootstraptoken.usage-bootstrap-signing= usage bootstrap signing for bootstrap tokens (default: true) [$BOOTSTRAPTOKEN_USAGE_BOOTSTRAP_SIGNING] |
| 34 | + --bootstraptoken.auth-extra-groups= Auth extra groups for bootstrap tokens (default: system:bootstrappers:worker,system:bootstrappers:ingress) [$BOOTSTRAPTOKEN_AUTH_EXTRA_GROUPS] |
| 35 | + --bootstraptoken.expiration= Expiration (time.Duration) for bootstrap tokens (default: 8760h) [$BOOTSTRAPTOKEN_EXPIRATION] |
| 36 | + --bootstraptoken.token-length= Length of the random token string for bootstrap tokens (default: 16) [$BOOTSTRAPTOKEN_TOKEN_LENGTH] |
| 37 | + --bootstraptoken.token-runes= Runes which should be used for the random token string for bootstrap tokens (default: |
| 38 | + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789) [$BOOTSTRAPTOKEN_TOKEN_RUNES] |
| 39 | + --sync.time= Sync time (time.Duration) (default: 1h) [$SYNC_TIME] |
| 40 | + --sync.recreate-before= Time duration (time.Duration) when token should be recreated (default: 2190h) [$SYNC_RECREATE_BEFORE] |
| 41 | + --cloud-provider=[azure] Cloud provider [$CLOUD_PROVIDER] |
| 42 | + --cloud-config= Cloud provider configuration path [$CLOUD_CONFIG] |
| 43 | + --azure-environment= Azure environment name [$AZURE_ENVIRONMENT] |
| 44 | + --azure.keyvault-name= Name of Keyvault to sync token [$AZURE_KEYVAULT_NAME] |
| 45 | + --azure.keyvault-secret-name= Name of Keyvault secret to sync token [$AZURE_KEYVAULT_SECRET_NAME] |
| 46 | + --dry-run Dry run (do not apply to nodes) [$DRY_RUN] |
| 47 | + --bind= Server address (default: :8080) [$SERVER_BIND] |
| 48 | +
|
| 49 | +Help Options: |
| 50 | + -h, --help Show this help message |
| 51 | +``` |
| 52 | + |
| 53 | +for Azure API authentication (using ENV vars) see https://github.com/Azure/azure-sdk-for-go#authentication |
| 54 | + |
| 55 | +Metrics |
| 56 | +------- |
| 57 | + |
| 58 | + (see `:8080/metrics`) |
| 59 | + |
| 60 | +| Metric | Description | |
| 61 | +|:-----------------------------------|:------------------------------------------------| |
| 62 | +| `bootstraptoken_token_info` | Info about current token | |
| 63 | +| `bootstraptoken_token_expiration` | Expiration time (unix timestamp) of token | |
| 64 | +| `bootstraptoken_sync_status` | Status if sync was successfull | |
| 65 | +| `bootstraptoken_sync_time` | Timestamp of last sync | |
| 66 | +| `bootstraptoken_sync_count` | Counter of sync | |
| 67 | + |
| 68 | +Kubernetes deployment |
| 69 | +--------------------- |
| 70 | + |
| 71 | +see [deployment](/deployment) |
0 commit comments