|
| 1 | +## Overview |
| 2 | + |
| 3 | +The Kubernetes Orchestrator allows for the remote management of certificate stores defined in a Kubernetes cluster. |
| 4 | +The following types of Kubernetes resources are supported: kubernetes secrets of `kubernetes.io/tls` or `Opaque` and |
| 5 | +kubernetes certificates `certificates.k8s.io/v1` |
| 6 | + |
| 7 | +The certificate store types that can be managed in the current version are: |
| 8 | +- `K8SCert` - Kubernetes certificates of type `certificates.k8s.io/v1` |
| 9 | +- `K8SSecret` - Kubernetes secrets of type `Opaque` |
| 10 | +- `K8STLSSecret` - Kubernetes secrets of type `kubernetes.io/tls` |
| 11 | +- `K8SCluster` - This allows for a single store to manage a k8s cluster's secrets or type `Opaque` and `kubernetes.io/tls`. |
| 12 | + This can be thought of as a container of `K8SSecret` and `K8STLSSecret` stores across all k8s namespaces. |
| 13 | +- `K8SNS` - This allows for a single store to manage a k8s namespace's secrets or type `Opaque` and `kubernetes.io/tls`. |
| 14 | + This can be thought of as a container of `K8SSecret` and `K8STLSSecret` stores for a single k8s namespace. |
| 15 | +- `K8SJKS` - Kubernetes secrets of type `Opaque` that contain one or more Java Keystore(s). These cannot be managed at the |
| 16 | + cluster or namespace level as they should all require unique credentials. |
| 17 | +- `K8SPKCS12` - Kubernetes secrets of type `Opaque` that contain one or more PKCS12(s). These cannot be managed at the |
| 18 | + cluster or namespace level as they should all require unique credentials. |
| 19 | + |
| 20 | +This orchestrator extension makes use of the Kubernetes API by using a service account |
| 21 | +to communicate remotely with certificate stores. The service account must have the correct permissions |
| 22 | +in order to perform the desired operations. For more information on the required permissions, see the |
| 23 | +[service account setup guide](#service-account-setup). |
| 24 | + |
| 25 | +## Requirements |
| 26 | + |
| 27 | +### Kubernetes API Access |
| 28 | +This orchestrator extension makes use of the Kubernetes API by using a service account |
| 29 | +to communicate remotely with certificate stores. The service account must exist and have the appropriate permissions. |
| 30 | +The service account token can be provided to the extension in one of two ways: |
| 31 | +- As a raw JSON file that contains the service account credentials |
| 32 | +- As a base64 encoded string that contains the service account credentials |
| 33 | + |
| 34 | +#### Service Account Setup |
| 35 | +To set up a service account user on your Kubernetes cluster to be used by the Kubernetes Orchestrator Extension. For full |
| 36 | +information on the required permissions, see the [service account setup guide](./scripts/kubernetes/README.md). |
| 37 | + |
| 38 | +## Discovery |
| 39 | + |
| 40 | +**NOTE:** To use discovery jobs, you must have the story type created in Keyfactor Command and the `needs_server` |
| 41 | +checkbox *MUST* be checked, if you do not select `needs_server` you will not be able to provide credentials to the |
| 42 | +discovery job and it will fail. |
| 43 | + |
| 44 | +The Kubernetes Orchestrator Extension supports certificate discovery jobs. This allows you to populate the certificate stores with existing certificates. To run a discovery job, follow these steps: |
| 45 | +1. Click on the "Locations > Certificate Stores" menu item. |
| 46 | +2. Click the "Discover" tab. |
| 47 | +3. Click the "Schedule" button. |
| 48 | +4. Configure the job based on storetype. **Note** the "Server Username" field must be set to `kubeconfig` and the "Server Password" field is the `kubeconfig` formatted JSON file containing the service account credentials. See the "Service Account Setup" section earlier in this README for more information on setting up a service account. |
| 49 | +  |
| 50 | +  |
| 51 | +  |
| 52 | +  |
| 53 | +5. Click the "Save" button and wait for the Orchestrator to run the job. This may take some time depending on the number of certificates in the store and the Orchestrator's check-in schedule. |
| 54 | + |
0 commit comments