Skip to content

Commit 0544ef6

Browse files
Merge pull request #5230 from loshan20011/master
2 parents 8184874 + 3c3d0f7 commit 0544ef6

File tree

5 files changed

+82
-11
lines changed

5 files changed

+82
-11
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% include "../../../../includes/deploy/deploy-is-in-kubernetes.md" %}

en/identity-server/7.1.0/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ nav:
815815
- Deploy:
816816
- Deployment patterns: deploy/deployment-guide.md
817817
- Deployment checklist: deploy/deployment-checklist.md
818+
- Deploy in Kuberenetes: deploy/deploy-is-in-kubernetes.md
818819
- WSO2 clusters with Nginx: deploy/front-with-the-nginx-load-balancer.md
819820
- Databases for clustering: deploy/set-up-separate-databases-for-clustering.md
820821
- Change the hostname: deploy/change-the-hostname.md
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% include "../../../../includes/deploy/deploy-is-in-kubernetes.md" %}

en/identity-server/next/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ nav:
815815
- Deploy:
816816
- Deployment patterns: deploy/deployment-guide.md
817817
- Deployment checklist: deploy/deployment-checklist.md
818+
- Deploy in Kuberenetes: deploy/deploy-is-in-kubernetes.md
818819
- WSO2 clusters with Nginx: deploy/front-with-the-nginx-load-balancer.md
819820
- Databases for clustering: deploy/set-up-separate-databases-for-clustering.md
820821
- Change the hostname: deploy/change-the-hostname.md

en/includes/deploy/deploy-is-in-kubernetes.md

Lines changed: 78 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,55 @@ Ensure that the specified namespace exists or create a new one using the followi
3838
kubectl get namespace $NAMESPACE || kubectl create namespace $NAMESPACE
3939
```
4040

41+
## Create a Kubernetes TLS secret
42+
43+
To enable secure HTTPS communication for your service (e.g., WSO2 Identity Server) within the Kubernetes cluster, you need to provide a TLS certificate and key. Kubernetes uses these to serve traffic over HTTPS using Ingress controllers or other resources that terminate TLS.
44+
45+
If you already have an SSL certificate and its private key (typically in .crt and .key format), you can create a Kubernetes TLS secret using the following command:
46+
47+
```shell
48+
kubectl create secret tls is-tls \
49+
--cert=path/to/cert/file \
50+
--key=path/to/key/file \
51+
-n $NAMESPACE
52+
```
53+
54+
- `is-tls` is the name of the secret.
55+
56+
- Replace `path/to/cert/file` and `path/to/key/file` with the actual paths to your certificate and key.
57+
58+
!!! note
59+
60+
- Ensure that the certificate includes `localhost` as a Subject Alternative Name (SAN) to support B2B related use cases without triggering certification validation errors.
61+
- When generating the keystore, use the default password `wso2carbon`.
62+
63+
## Create a Kubernetes secret for Java Keystore files
64+
65+
To support secure communication and cryptographic operations, the deployment requires four Java keystore files. These keystores are mounted into the container and used for tasks such as internal encryption, message signing, TLS, and trust validation.
66+
67+
- **Internal keystore (internal.p12):** Used for encrypting/decrypting internal data.
68+
- **Primary keystore (primary.p12):** Certificates used for signing messages that are communicated with external parties (such as SAML, OIDC id_token signing).
69+
- **TLS keystore (tls.p12):** Used for TLS communication.
70+
- **Client truststore (client-truststore.p12):** Certificates of trusted third parties.
71+
72+
```shell
73+
kubectl create secret generic keystores \
74+
--from-file=internal.p12 \
75+
--from-file=primary.p12 \
76+
--from-file=tls.p12 \
77+
--from-file=client-truststore.p12 \
78+
-n $NAMESPACE
79+
```
80+
81+
!!! note
82+
83+
- Make sure to import the public key certificates of all three keystores into the truststore (client-truststore.p12).
84+
- To learn how to create these keystores and truststores, refer to [Create New Keystores]({{base_path}}/deploy/security/keystores/create-new-keystores/).
85+
- The `tls.p12` file used here should contain the same certificate and key that were used to create the `is-tls` TLS secret above, to ensure consistency in TLS communication.
86+
4187
## Install the Helm chart
4288

43-
There are two ways to install the {{product_name}} Helm chart. The Helm chart source code can be found in the [kubernets-is repository](https://github.com/wso2/kubernetes-is/tree/master){:target=" _blank"}.
89+
There are two ways to install the {{product_name}} using the Helm chart. The Helm chart source code can be found in the [kubernetes-is repository](https://github.com/wso2/kubernetes-is/tree/master){:target=" _blank"}.
4490

4591
### Option 1: Install the chart from the Helm repository
4692
1. Add the WSO2 Helm chart repository
@@ -54,21 +100,23 @@ There are two ways to install the {{product_name}} Helm chart. The Helm chart so
54100
2. Install the Helm chart from the Helm repository.
55101
{% if is_version == "7.0.0" %}
56102
```shell
57-
helm install "$RELEASE_NAME" wso2/identity-server --version {{is_version}}-2 \
58-
-n "$NAMESPACE" \
103+
helm install $RELEASE_NAME wso2/identity-server --version {{is_version}}-2 \
104+
-n $NAMESPACE \
59105
--set deployment.image.registry="wso2" \
60106
--set deployment.image.repository="wso2is" \
61107
--set deployment.image.tag="{{is_version}}" \
62-
--set deployment.apparmor.enabled="false"
108+
--set deployment.apparmor.enabled="false" \
109+
--set deployment.externalJKS.enabled="true"
63110
```
64111
{% else %}
65112
```shell
66-
helm install "$RELEASE_NAME" wso2/identity-server --version {{is_version}}-1 \
67-
-n "$NAMESPACE" \
113+
helm install $RELEASE_NAME wso2/identity-server --version {{is_version}}-1 \
114+
-n $NAMESPACE \
68115
--set deployment.image.registry="wso2" \
69116
--set deployment.image.repository="wso2is" \
70117
--set deployment.image.tag="{{is_version}}" \
71-
--set deployment.apparmor.enabled="false"
118+
--set deployment.apparmor.enabled="false" \
119+
--set deployment.externalJKS.enabled="true"
72120
```
73121
{% endif %}
74122

@@ -99,11 +147,12 @@ If you prefer to build the chart from the source, follow the steps below:
99147
2. Install the Helm chart from the cloned repository:
100148

101149
```shell
102-
helm install "$RELEASE_NAME" -n "$NAMESPACE" . \
150+
helm install $RELEASE_NAME -n $NAMESPACE . \
103151
--set deployment.image.registry="wso2" \
104152
--set deployment.image.repository="wso2is" \
105153
--set deployment.image.tag="{{is_version}}" \
106-
--set deployment.apparmor.enabled="false"
154+
--set deployment.apparmor.enabled="false" \
155+
--set deployment.externalJKS.enabled="true"
107156
```
108157

109158
!!! note "Use a custom docker image"
@@ -114,6 +163,24 @@ If you prefer to build the chart from the source, follow the steps below:
114163
--set deployment.image.digest=<digest>
115164
```
116165

166+
## (Optional) Change of Keystore passwords
167+
168+
Generate the keystore using the default password "wso2carbon". However, if you have used a different password, update the following configurations accordingly:
169+
170+
```shell
171+
--set deploymentToml.keystore.internal.fileName="internal.p12" \
172+
--set deploymentToml.keystore.internal.password="<value>" \
173+
--set deploymentToml.keystore.internal.keyPassword="<value>" \
174+
--set deploymentToml.keystore.primary.fileName="primary.p12" \
175+
--set deploymentToml.keystore.primary.password="<value>" \
176+
--set deploymentToml.keystore.primary.keyPassword="<value>" \
177+
--set deploymentToml.keystore.tls.fileName="tls.p12" \
178+
--set deploymentToml.keystore.tls.password="<value>" \
179+
--set deploymentToml.keystore.tls.keyPassword="<value>" \
180+
--set deploymentToml.truststore.fileName="client-truststore.p12" \
181+
--set deploymentToml.truststore.password="<value>"
182+
```
183+
117184
## (Optional) Configure resource limits
118185

119186
By default, WSO2 Identity Server requests and limits the following resources in your Kubernetes cluster:
@@ -153,10 +220,10 @@ If your Kubernetes cluster has limited resources, you can adjust these values wh
153220

154221
## Obtain the External IP
155222

156-
After deploying WSO2 Identity Server, you need to find its external IP address to access it outside the cluster. Run the following command to list the Ingress resources in your namespace:
223+
After deploying WSO2 Identity Server, you need to find its external IP address to access it outside the cluster. Run the following command to list the ingress resources in your namespace:
157224

158225
```shell
159-
kubectl get ing -n "$NAMESPACE"
226+
kubectl get ing -n $NAMESPACE
160227
```
161228

162229
The output will contain the following columns:

0 commit comments

Comments
 (0)