-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create controller CA ConfigMap in the controller deployement Namespace #878
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,10 +92,12 @@ clientConnection: | |
#apiPort: 10349 | ||
|
||
# Indicates whether to use auto-generated self-signed TLS certificate. | ||
# If false, A secret named "kube-system/antrea-controller-tls" must be provided with the following keys: | ||
# If false, A Secret named "antrea-controller-tls" must be provided with the following keys: | ||
# ca.crt: <CA certificate> | ||
# tls.crt: <TLS certificate> | ||
# tls.key: <TLS private key> | ||
# And the Secret must be mounted to directory "/var/run/antrea/antrea-controller-tls" of the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Insert it before There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
# antrea-controller container. | ||
#selfSignedCert: true | ||
``` | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,20 +33,23 @@ for client authentication. | |
By default, antrea-controller generates a self-signed certificate. You can | ||
override the behavior by [providing your own certificates](#providing-your-own-certificates). | ||
Either way, the antrea-controller will distribute the CA certificate as a | ||
ConfigMap named `antrea-ca` in the `kube-system` Namespace and inject it into | ||
the APIServices resources created by Antrea in order to allow its clients (i.e. | ||
antrea-agent, kube-apiserver) to perform authentication. | ||
ConfigMap named `antrea-ca` in the Antrea deployment Namespace and inject it | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deployment -> Deployment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Antonin suggested to cover both controller and agent, so I used Antrea deployment to refer to the whole deployment of Antrea components. |
||
into the APIServices resources created by Antrea in order to allow its clients | ||
(i.e. antrea-agent, kube-apiserver) to perform authentication. | ||
|
||
Typically, clients that wish to access the antrea-controller API can | ||
authenticate the server by validating against the CA certificate published in | ||
the `kube-system/antrea-ca` ConfigMap. | ||
the `antrea-ca` ConfigMap. | ||
|
||
## Providing your own certificates | ||
|
||
Since Antrea v0.7.0, you can provide your own certificates to Antrea. To do so, | ||
you must set the `selfSignedCert` field of `antrea-controller.conf` to `false`, | ||
so that the antrea-controller will read the certificate key pair from the | ||
`kube-system/antrea-controller-tls` Secret. | ||
`antrea-controller-tls` Secret. The example manifests and descriptions below | ||
assume Antrea is deployed in the `kube-system` Namespace. If you deploy Antrea | ||
in a different Namepace, please update the Namespace name in the manifests | ||
accordingly. | ||
|
||
```yaml | ||
apiVersion: v1 | ||
|
@@ -77,8 +80,8 @@ DNS names: | |
**Note: It assumes you are using `cluster.local` as the cluster domain, you | ||
should replace it with the actual one of your Kubernetes cluster.** | ||
|
||
You can then create the `kube-system/antrea-controller-tls` Secret with the | ||
certificate key pair and the CA certificate in the following form: | ||
You can then create the `antrea-controller-tls` Secret with the certificate key | ||
pair and the CA certificate in the following form: | ||
```yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
|
@@ -147,7 +150,7 @@ to the antrea-controller Pod if the Pod starts before the Secret is created.** | |
## Certificate rotation | ||
|
||
Antrea v0.7.0 and higher supports certificate rotation. It can be achieved by | ||
simply updating the `kube-system/antrea-controller-tls` Secret. The | ||
simply updating the `antrea-controller-tls` Secret. The | ||
antrea-controller will react to the change, updating its serving certificate and | ||
re-distributing the latest CA certificate (if applicable). | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insert it before
Defaults to true.
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed.