|
1 |
| -# Ceating credentials for a WebLogic domain |
| 1 | +# Creating credentials for a WebLogic domain |
2 | 2 |
|
3 |
| -**TODO** write me |
| 3 | +This sample demonstrates how to create a Kubernetes secret containing the |
| 4 | +credentials for a WebLogic domain. The operator expects this secret to be |
| 5 | +named following the pattern `domainUID-weblogic-credentials`, where `domainUID` |
| 6 | +is the unique identifier of the domain. It must be in the same namespace |
| 7 | +that the domain will run in. |
| 8 | + |
| 9 | +To use the sample, run the command: |
| 10 | + |
| 11 | +``` |
| 12 | +$ ./create-weblogic-credentials.sh -u username -p password -d domainUID -n namespace -s secretName |
| 13 | +``` |
| 14 | + |
| 15 | +The parameters are as follows: |
| 16 | + |
| 17 | +``` |
| 18 | + -u username, must be specified. |
| 19 | + -p password, must be specified. |
| 20 | + -d domainUID, optional. The default value is domain1. If specified, the secret will be labeled with the domainUID unless the given value is an empty string. |
| 21 | + -n namespace, optional. Use the default namespace if not specified |
| 22 | + -s secretName, optional. If not specified, the secret name will be determined based on the domainUID value |
| 23 | +``` |
| 24 | + |
| 25 | +This creates a `generic` secret containing the username and password as literal values. |
| 26 | + |
| 27 | +You can check the secret with the `kubectl get secret` command. An example is shown below, |
| 28 | +including output: |
| 29 | + |
| 30 | +``` |
| 31 | +$ kubectl -n domain-namespace-1 get secret domain1-weblogic-credentials -o yaml |
| 32 | +apiVersion: v1 |
| 33 | +data: |
| 34 | + password: d2VsY29tZTE= |
| 35 | + username: d2VibG9naWM= |
| 36 | +kind: Secret |
| 37 | +metadata: |
| 38 | + creationTimestamp: 2018-12-12T20:25:20Z |
| 39 | + labels: |
| 40 | + weblogic.domainName: domain1 |
| 41 | + weblogic.domainUID: domain1 |
| 42 | + name: domain1-weblogic-credentials |
| 43 | + namespace: domain-namespace-1 |
| 44 | + resourceVersion: "5680" |
| 45 | + selfLink: /api/v1/namespaces/domain-namespace-1/secrets/domain1-weblogic-credentials |
| 46 | + uid: 0c2b3510-fe4c-11e8-994d-00001700101d |
| 47 | +type: Opaque |
| 48 | +
|
| 49 | +``` |
0 commit comments