Skip to content

Commit d81db46

Browse files
csantanaprmimaison
authored andcommitted
improve UX by using file when creating k8s secrets in samples
Signed-off-by: Carlos Santana <csantana23@gmail.com>
1 parent e002f80 commit d81db46

File tree

5 files changed

+20
-25
lines changed

5 files changed

+20
-25
lines changed

kafka-java-console-sample/docs/Kubernetes_Service.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ To build and run the sample, you must have the done the following:
1212

1313
## Deploy the Application
1414

15-
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content.
16-
17-
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Replace `<Service Credentials>` with the content copied in step 1.
15+
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content, create a file `credentials.json` and paste the content.
16+
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Create a secret using the content from the file `credentials.json`
1817
```shell
19-
kubectl create secret generic eventstreams-binding --from-literal=binding='<Service Credentials>'
18+
kubectl create secret generic eventstreams-binding --from-file=binding=credentials.json
2019
```
2120
The command above creates a secret in your cluster named `eventstreams-binding`.
22-
2321
3. [Configure the CLI to run kubectl](https://cloud.ibm.com/docs/containers?topic=containers-cs_cli_install#cs_cli_configure)
2422

2523
4. Deploy the application in the cluster:
@@ -28,6 +26,7 @@ To build and run the sample, you must have the done the following:
2826
```
2927
5. Access the application logs:
3028
```shell
29+
kubectl wait pod kafka-java-console-sample --for=condition=Ready
3130
kubectl logs kafka-java-console-sample --follow
3231
```
3332

kafka-java-console-schema-sample/docs/Kubernetes_Service.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ To build and run the sample, you must have the done the following:
1212

1313
## Deploy the Application
1414

15-
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content.
16-
17-
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Replace `<Service Credentials>` with the content copied in step 1.
15+
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content, create a file `credentials.json` and paste the content.
16+
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Create a secret using the content from the file `credentials.json`
1817
```shell
19-
kubectl create secret generic eventstreams-binding --from-literal=binding='<Service Credentials>'
18+
kubectl create secret generic eventstreams-binding --from-file=binding=credentials.json
2019
```
2120
The command above creates a secret in your cluster named `eventstreams-binding`.
22-
2321
3. [Configure the CLI to run kubectl](https://cloud.ibm.com/docs/containers?topic=containers-cs_cli_install#cs_cli_configure)
2422

2523
4. Deploy the application in the cluster:
@@ -28,6 +26,7 @@ To build and run the sample, you must have the done the following:
2826
```
2927
5. Access the application logs:
3028
```shell
29+
kubectl wait pod kafka-java-console-schema-sample --for=condition=Ready
3130
kubectl logs kafka-java-console-schema-sample --follow
3231
```
3332

kafka-java-liberty-sample/docs/Kubernetes_Service.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ To build and run the sample, you must have the done the following:
1212

1313
## Deploy the Application
1414

15-
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content.
16-
17-
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Replace `<Service Credentials>` with the content copied in step 1.
15+
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content, create a file `credentials.json` and paste the content.
16+
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Create a secret using the content from the file `credentials.json`
1817
```shell
19-
kubectl create secret generic eventstreams-binding --from-literal=binding='<Service Credentials>'
18+
kubectl create secret generic eventstreams-binding --from-file=binding=credentials.json
2019
```
2120
The command above creates a secret in your cluster named `eventstreams-binding`.
22-
2321
3. [Configure the CLI to run kubectl](https://cloud.ibm.com/docs/containers?topic=containers-cs_cli_install#cs_cli_configure)
2422

2523
4. Deploy the application in the cluster:
@@ -28,6 +26,7 @@ To build and run the sample, you must have the done the following:
2826
```
2927
5. Access the application:
3028
```shell
29+
kubectl wait pod kafka-java-liberty-sample --for=condition=Ready
3130
kubectl port-forward kafka-java-liberty-sample 9080:9080
3231
```
3332
Point your browser to [http://localhost:9080](http://localhost:9080)

kafka-nodejs-console-sample/docs/Kubernetes_Service.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ To build and run the sample, you must have the done the following:
1212

1313
## Deploy the Application
1414

15-
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content.
16-
17-
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Replace `<Service Credentials>` with the content copied in step 1.
15+
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content, create a file `credentials.json` and paste the content.
16+
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Create a secret using the content from the file `credentials.json`
1817
```shell
19-
kubectl create secret generic eventstreams-binding --from-literal=binding='<Service Credentials>'
18+
kubectl create secret generic eventstreams-binding --from-file=binding=credentials.json
2019
```
2120
The command above creates a secret in your cluster named `eventstreams-binding`.
22-
2321
3. [Configure the CLI to run kubectl](https://cloud.ibm.com/docs/containers?topic=containers-cs_cli_install#cs_cli_configure)
2422

2523
4. Deploy the application in the cluster:
@@ -28,6 +26,7 @@ To build and run the sample, you must have the done the following:
2826
```
2927
5. Access the application logs:
3028
```shell
29+
kubectl wait pod kafka-nodejs-console-sample --for=condition=Ready
3130
kubectl logs kafka-nodejs-console-sample --follow
3231
```
3332

kafka-python-console-sample/docs/Kubernetes_Service.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ To build and run the sample, you must have the done the following:
1212

1313
## Deploy the Application
1414

15-
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content.
16-
17-
2. To deploy the application you first need to bind the Event Streams service instance to the cluster. Replace `<Service Credentials>` with the content copied in step 1.
15+
1. From the Event Streams for IBM Cloud instance dashboard, click `Service Credentials` and select or create a new one. Copy its content, create a file `credentials.json` and paste the content.
16+
2. To deploy the application you first need to bind the Event Streams for IBM Cloud service instance to the cluster. Create a secret using the content from the file `credentials.json`
1817
```shell
19-
kubectl create secret generic eventstreams-binding --from-literal=binding='<Service Credentials>'
18+
kubectl create secret generic eventstreams-binding --from-file=binding=credentials.json
2019
```
2120
The command above creates a secret in your cluster named `eventstreams-binding`.
22-
2321
3. [Configure the CLI to run kubectl](https://cloud.ibm.com/docs/containers?topic=containers-cs_cli_install#cs_cli_configure)
2422

2523
4. Deploy the application in the cluster:
@@ -28,6 +26,7 @@ To build and run the sample, you must have the done the following:
2826
```
2927
5. Access the application logs:
3028
```shell
29+
kubectl wait pod kafka-python-console-sample --for=condition=Ready
3130
kubectl logs kafka-python-console-sample --follow
3231
```
3332

0 commit comments

Comments
 (0)