Skip to content
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

Optimizations/consolidations #566

Merged
merged 5 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions content/en/docs/additional-concepts/configmaps/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,12 @@ Here is a complete example Deployment of a sample Java app:

This means that the container should now be able to access the ConfigMap's content in `/etc/config/java.properties`. Let's check:

{{% onlyWhen openshift %}}

```bash
oc exec <pod name> --namespace <namespace> -- cat /etc/config/java.properties
```

{{% /onlyWhen %}}
{{% onlyWhenNot openshift %}}

```bash
kubectl exec -it <pod> --namespace <namespace> -- cat /etc/config/java.properties
{{% param cliToolName %}} exec <pod> --namespace <namespace> -- cat /etc/config/java.properties
```

{{% /onlyWhenNot %}}

{{% alert title="Note" color="info" %}}
On Windows, you can use Git Bash with `winpty kubectl exec -it <pod> --namespace <namespace> -- cat //etc/config/java.properties`.
On Windows, you can use Git Bash with `winpty {{% param cliToolName %}} exec -it <pod> --namespace <namespace> -- cat //etc/config/java.properties`.
{{% /alert %}}

{{< readfile file="/content/en/docs/additional-concepts/configmaps/java.properties" code="true" lang="yaml" >}}
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/troubleshooting/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Running containers should be treated as immutable infrastructure and should ther

## {{% task %}} Shell into Pod

With {{% param distroName %}} you can open a remote shell into a Pod without installing SSH by using the command `{{% onlyWhenNot openshift %}}kubectl exec{{% /onlyWhenNot %}}{{% onlyWhen openshift %}}oc rsh{{% /onlyWhen %}}`. The command can also be used to execute any command in a Pod.
{{% onlyWhenNot openshift %}}With the parameter `-it` you can leave an open connection.{{% /onlyWhenNot %}}
With {{% param distroName %}} you can open a remote shell into a Pod without installing SSH by using the command `{{% param cliToolName %}} {{% onlyWhenNot openshift %}}exec{{% /onlyWhenNot %}}{{% onlyWhen openshift %}}rsh{{% /onlyWhen %}}`. The command can also be used to execute any command in a Pod.
{{% onlyWhenNot openshift %}}If you want to get a shell to a running container, you will additionally need the parameters `-it`. These set up an interactive session where you can supply input to the process inside the container.{{% /onlyWhenNot %}}

{{% alert title="Note" color="info" %}}
If you're using Git Bash on Windows, you need to append the command with `winpty`.
Expand Down