diff --git a/content/en/docs/additional-concepts/configmaps/_index.md b/content/en/docs/additional-concepts/configmaps/_index.md index 1201211a..19ff60e7 100644 --- a/content/en/docs/additional-concepts/configmaps/_index.md +++ b/content/en/docs/additional-concepts/configmaps/_index.md @@ -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 --namespace -- cat /etc/config/java.properties -``` - -{{% /onlyWhen %}} -{{% onlyWhenNot openshift %}} - ```bash -kubectl exec -it --namespace -- cat /etc/config/java.properties +{{% param cliToolName %}} exec --namespace -- cat /etc/config/java.properties ``` -{{% /onlyWhenNot %}} - {{% alert title="Note" color="info" %}} -On Windows, you can use Git Bash with `winpty kubectl exec -it --namespace -- cat //etc/config/java.properties`. +On Windows, you can use Git Bash with `winpty {{% param cliToolName %}} exec -it --namespace -- cat //etc/config/java.properties`. {{% /alert %}} {{< readfile file="/content/en/docs/additional-concepts/configmaps/java.properties" code="true" lang="yaml" >}} diff --git a/content/en/docs/troubleshooting/_index.md b/content/en/docs/troubleshooting/_index.md index dcc71ba4..d4fb4cd1 100644 --- a/content/en/docs/troubleshooting/_index.md +++ b/content/en/docs/troubleshooting/_index.md @@ -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`.