Skip to content

Commit

Permalink
docs: use code instead of shell (#46341)
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Martin <[email protected]>
  • Loading branch information
stevenGravy and Steven Martin authored Sep 6, 2024
1 parent 241a655 commit 236d9fa
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ For example the command:
$ kubectl explain teleportroles.spec
```
Returns the following fields:
```shell
```code
KIND: TeleportRole
VERSION: resources.teleport.dev/v5
Expand Down Expand Up @@ -231,7 +231,7 @@ Here `SuccessfullyReconciled` is `False` and the error is `role my-non-existing-

If the status is not present or does not give sufficient information to solve the issue, check the operator logs:

```shell
```code
$ kubectl logs "$AUTH_POD" -c operator
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ granted through database-specific roles, such as `reader`.

Otherwise you may see errors like the following:

```shell
```code
$ tsh db connect --db-name <database> example
ERROR 1105 (HY000): ERROR 1044 (42000): Access denied for user '<your-teleport-username>'@'%' to database '<database>'
```
Expand All @@ -116,7 +116,7 @@ ERROR 1105 (HY000): ERROR 1044 (42000): Access denied for user '<your-teleport-u

You may encounter the following error when connecting to an AWS RDS Aurora
reader endpoint:
```shell
```code
$ tsh db connect --db-name <database> example
ERROR 3501 (HY000): The ACL operation failed due to the following error from SE: errcode 165 - Table is read only
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ You may encounter the following error when the admin user or the roles assigned
to the auto-provisioned user do not have permission to connect to the target
database:

```shell
```code
$ tsh db connect --db-name <database> example
...
FATAL: permission denied for database "<database>"
Expand All @@ -117,7 +117,7 @@ GRANT CONNECT ON DATABASE <database> to "reader";

You may encounter the following error when connecting to an AWS RDS Aurora
reader endpoint:
```shell
```code
$ tsh db connect --db-name <database> example
psql: error: connection to server at "localhost" (::1), port 12345 failed: Connection refused
...
Expand All @@ -131,7 +131,7 @@ endpoints. Please use auto-user provisioning on the primary endpoints.

You may encounter the following error when connecting if the admin user does
not have `USAGE` permission on the schema:
```shell
```code
$ tsh db connect --db-name <database> example
psql: error: connection to server at "localhost" (::1), port 12345 failed: Connection refused
...
Expand All @@ -148,7 +148,7 @@ GRANT CREATE ON SCHEMA public TO "teleport-admin";
### Permission denied to grant role "rds_iam"

You may encounter the following error when connecting to an RDS database:
```shell
```code
$ tsh db connect --db-name <database> example
psql: error: connection to server at "localhost" (::1), port 12345 failed: Connection refused
...
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
You may encounter the following error when connecting to a database in a remote
cluster:
```shell
```code
> tsh db connect --db-name <database> example
ERROR: please use your mapped remote username ("remote-<your-teleport-username>-<root-cluster-name>") to connect instead of "<database-user>"
```
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/includes/database-access/redis-create-users.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Each Redis user must be protected by a strong password. We recommend using OpenSSL to generate passwords:

```shell
```code
openssl rand -hex 32
```

Expand All @@ -17,7 +17,7 @@ and sets of ACL rules. Redis allows you to provide passwords in plaintext or an
We strongly recommend using an SHA256 hash instead of plaintext passwords.

You can use the command below to generate an SHA256 hash from a password.
```shell
```code
echo -n STRONG_GENERATED_PASSWORD | sha256sum
```

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/reference/helm-reference/teleport-cluster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ set to use a TLS certificate issued by a trusted internal CA rather than a publi

You should create the secret in the same namespace as Teleport using a command like this:

```shell
```code
kubectl create secret tls my-tls-secret --cert=/path/to/cert/file --key=/path/to/key/file
```

Expand Down Expand Up @@ -1359,7 +1359,7 @@ in the pod logs.

You should create the secret in the same namespace as Teleport using a command like this:

```shell
```code
kubectl create secret generic my-root-ca --from-file=ca.pem=/path/to/root-ca.pem
```

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/reference/join-methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ They are time-bound and are typically created just before joining an instance to
the Teleport cluster.
They can be created by the CLI (a strong random value is picked when not specified, default TTL is 30 minutes):
```shell
```code
$ tctl tokens add --type discovery,app --ttl 15m
```

Expand Down

0 comments on commit 236d9fa

Please sign in to comment.