Skip to content

Commit 1246f5f

Browse files
authored
Merge pull request #101 from JoshVanL/update-docs
Update README.md
2 parents b23654f + 9021c81 commit 1246f5f

File tree

3 files changed

+144
-35
lines changed

3 files changed

+144
-35
lines changed

README.md

Lines changed: 76 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,106 @@
1+
<p align="center"><img src="https://github.com/jetstack/cert-manager/blob/master/logo/logo.png" width="250x" /></p>
2+
</a>
3+
<a href="https://godoc.org/github.com/cert-manager/istio-csr"><img src="https://godoc.org/github.com/cert-manager/istio-csr?status.svg"></a>
4+
<a href="https://goreportcard.com/report/github.com/cert-manager/istio-csr"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/cert-manager/istio-csr" /></a></p>
5+
16
# istio-csr
27

3-
cert-manager-istio-csr is an agent which allows for [istio](https://istio.io) workload
4-
and control plane components to be secured using
8+
istio-csr is an agent that allows for [Istio](https://istio.io) workload and
9+
control plane components to be secured using
510
[cert-manager](https://cert-manager.io). Certificates facilitating mTLS, inter
611
and intra cluster, will be signed, delivered and renewed using [cert-manager
712
issuers](https://cert-manager.io/docs/concepts/issuer).
813

9-
⚠️ Currently supports istio versions v1.7+
14+
⚠️ Currently supports Istio versions v1.7+
15+
1016
⚠️ Currently supports cert-manager versions v1.3+
1117

1218
---
1319

1420
## Installation
1521

22+
### Installing cert-manager
23+
1624
Firstly, [cert-manager must be
17-
installed](https://cert-manager.io/docs/installation/) in your cluster. An
18-
issuer must be configured, which will be used to sign your certificate
19-
workloads, as well a ready Certificate to serve istiod. Example Issuer and
20-
istiod Certificate configuration can be found in
21-
[`./hack/demo/cert-manager-bootstrap-resources.yaml`](./hack/demo/cert-manager-bootstrap-resources.yaml).
25+
installed](https://cert-manager.io/docs/installation/) in your cluster.
26+
27+
### Issuer or ClusterIssuer
28+
An Issuer or ClusterIssuer must be configured which will be used to sign Istio
29+
certificates against.
30+
31+
Here are examples of CA [Issuer](./docs/example-issuer.yaml) and
32+
[ClusterIssuer](./docs/example-cluster-issuer.yaml) configurations that are
33+
bootstrapped through self-signed issuers. It is advised to not use the CA Issuer
34+
type in production environments, and instead use an issuer who's CA private key
35+
material does not reside within the cluster.
36+
37+
> It is important to use an issuer type that is able to sign Istio mTLS workload
38+
> certificates (SPIFFE URI SANs) and
39+
> [istiod serving certificates](./deploy/charts/istio-csr/templates/certificate.yaml).
40+
> ACME issuers will not work.
41+
42+
If using an Issuer rather than the ClusterIssuer type, the Issuer must reside in
43+
the same namespace as that configured by `--certificate-namespace` on istio-csr,
44+
`istio-system` by default.
45+
46+
### Installing istio-csr
47+
48+
Next, install istio-csr into the cluster, configured to use the Issuer or
49+
ClusterIssuer installed earlier.
50+
51+
> ⚠️ It is highly recommended that the root CA certificates are statically
52+
> defined in istio-csr. If they are not, istio-csr will "discover" the root CA
53+
> certificates when requesting its serving certificate, effectively making
54+
> istio-csr [TOFU](https://en.wikipedia.org/wiki/Trust_on_first_use).
2255
23-
Next, install the cert-manager-istio-csr into the cluster, configured to use
24-
the Issuer deployed. The Issuer must reside in the same namespace as that
25-
configured by `-c, --certificate-namespace`, which is `istio-system` by default.
56+
#### Discover root CAs installation
2657

27-
```bash
58+
```terminal
2859
$ helm repo add jetstack https://charts.jetstack.io
2960
$ helm repo update
61+
$ kubectl create namespace istio-system
3062
$ helm install -n cert-manager cert-manager-istio-csr jetstack/cert-manager-istio-csr
3163
```
3264

33-
All helm value options can be found in
34-
[here](./deploy/charts/istio-csr/README.md).
65+
#### Load root CAs from file ca.pem (Preferred)
3566

36-
If you are running Openshift, prepare the cluster for Istio.
37-
Follow instructions from Istio [platform setup guide](https://istio.io/latest/docs/setup/platform-setup/openshift/)
67+
```terminal
68+
$ helm repo add jetstack https://charts.jetstack.io
69+
$ helm repo update
70+
$ kubectl create namespace istio-system
71+
$ kubectl create secret generic istio-root-ca --from-file=ca.pem=ca.pem -n cert-manager
72+
$ helm install -n cert-manager cert-manager-istio-csr jetstack/cert-manager-istio-csr \
73+
--set "app.tls.rootCAFile=/var/run/secrets/istio-csr/ca.pem" \
74+
--set "volumeMounts[0].name=root-ca" \
75+
--set "volumeMounts[0].mountPath=/var/run/secrets/istio-csr" \
76+
--set "volumes[0].name=root-ca" \
77+
--set "volumes[0].secret.secretName=istio-root-ca"
78+
```
3879

39-
Finally, install istio. Istio must be installed using the IstioOperator
40-
configuration changes within
41-
[`./hack/istio-config-x.yaml`](./hack/istio-config-1.10.0.yaml).
42-
For OpenShift set the profile as `--set profile=openshift`
80+
All helm value options can be found [here](./deploy/charts/istio-csr/README.md).
4381

44-
These changes are required in order for the CA Server to be disabled in istiod, ensure istio
45-
workloads request certificates from the cert-manager agent, and the istiod
46-
certificates and keys are mounted in from the Certificate created earlier.
82+
### Installing Istio
4783

84+
If you are running Openshift, prepare the cluster for Istio.
85+
Follow instructions from Istio [platform setup
86+
guide](https://istio.io/latest/docs/setup/platform-setup/openshift/).
4887

49-
## How
88+
Finally, install Istio. Istio must be installed using the IstioOperator
89+
configuration changes within
90+
[`./hack/istio-config-x.yaml`](./hack/istio-config-1.10.0.yaml). Later versions
91+
of Istio share the same config.
5092

51-
The cert-manager istio agent implements the gRPC istio certificate service,
52-
which authenticates, authorizes, and signs incoming certificate signing requests
53-
from istio workloads. This matches the behaviour of istiod in a typical
54-
installation, however enables these certificates to be signed through
55-
cert-manager.
93+
For OpenShift set the profile as `--set profile=openshift`.
5694

57-
---
95+
These config options are required in order for the CA Server to be disabled in
96+
istiod, ensure Istio workloads request certificates from istio-csr, and the
97+
istiod certificates and keys are mounted from the Certificate created when
98+
installing istio-csr.
5899

59-
## Testing
60100

61-
To run the end to end tests, run;
101+
## How
62102

63-
```bash
64-
$ make e2e
65-
```
103+
The cert-manager Istio agent implements the gRPC Istio certificate service which
104+
authenticates, authorizes, and signs incoming certificate signing requests from
105+
Istio workloads. This matches the behaviour of istiod in a typical installation,
106+
however enables these certificates to be signed through cert-manager.

docs/example-cluster-issuer.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: cert-manager.io/v1
2+
kind: ClusterIssuer
3+
metadata:
4+
name: selfsigned
5+
spec:
6+
selfSigned: {}
7+
---
8+
apiVersion: cert-manager.io/v1
9+
kind: Certificate
10+
metadata:
11+
name: istio-ca
12+
namespace: cert-manager
13+
spec:
14+
isCA: true
15+
duration: 2160h # 90d
16+
secretName: istio-ca
17+
commonName: istio-ca
18+
subject:
19+
organizations:
20+
- cluster.local
21+
- cert-manager
22+
issuerRef:
23+
name: selfsigned
24+
kind: ClusterIssuer
25+
group: cert-manager.io
26+
---
27+
apiVersion: cert-manager.io/v1
28+
kind: ClusterIssuer
29+
metadata:
30+
name: istio-ca
31+
spec:
32+
ca:
33+
secretName: istio-ca

docs/example-issuer.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: cert-manager.io/v1
2+
kind: Issuer
3+
metadata:
4+
name: selfsigned
5+
namespace: istio-system
6+
spec:
7+
selfSigned: {}
8+
---
9+
apiVersion: cert-manager.io/v1
10+
kind: Certificate
11+
metadata:
12+
name: istio-ca
13+
namespace: istio-system
14+
spec:
15+
isCA: true
16+
duration: 2160h # 90d
17+
secretName: istio-ca
18+
commonName: istio-ca
19+
subject:
20+
organizations:
21+
- cluster.local
22+
- cert-manager
23+
issuerRef:
24+
name: selfsigned
25+
kind: Issuer
26+
group: cert-manager.io
27+
---
28+
apiVersion: cert-manager.io/v1
29+
kind: Issuer
30+
metadata:
31+
name: istio-ca
32+
namespace: istio-system
33+
spec:
34+
ca:
35+
secretName: istio-ca

0 commit comments

Comments
 (0)