Skip to content

Commit

Permalink
Merge pull request #634 from acend/ocp-curl-fix
Browse files Browse the repository at this point in the history
Fix curl command for OpenShift
  • Loading branch information
bliemli authored Nov 26, 2024
2 parents 6f04036 + 6b99e49 commit 3755fda
Showing 1 changed file with 1 addition and 55 deletions.
56 changes: 1 addition & 55 deletions content/en/docs/scaling/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,43 +251,17 @@ Now, execute the corresponding loop command for your operating system in another
Linux:

{{% onlyWhen openshift %}}
{{% onlyWhenNot baloise %}}

```bash
URL=$(oc get routes example-web-app -o go-template="{{ .spec.host }}" --namespace <namespace>)
while true; do sleep 1; curl -s http://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```

{{% /onlyWhenNot %}}
{{% onlyWhen baloise %}}

```bash
URL=$(oc get routes example-web-app -o go-template="{{ .spec.host }}" --namespace <namespace>)
while true; do sleep 1; curl -s https://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```

{{% /onlyWhen %}}
{{% /onlyWhen %}}
{{% onlyWhenNot openshift %}}
```bash
URL=$(kubectl get ingress example-web-app -o go-template="{{ (index .spec.rules 0).host }}" --namespace <namespace>)
while true; do sleep 1; curl -s https://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```
{{% /onlyWhenNot %}}
{{% onlyWhenNot baloise %}}

Windows PowerShell:

```bash
while(1) {
Start-Sleep -s 1
Invoke-RestMethod http://<URL>/pod/
Get-Date -Uformat "+ TIME: %H:%M:%S,%3N"
}
```

{{% /onlyWhenNot %}}
{{% onlyWhen baloise %}}

Windows PowerShell:

Expand All @@ -299,7 +273,6 @@ while(1) {
}
```

{{% /onlyWhen %}}
Scale from 3 replicas to 1.
The output shows which Pod is still alive and is responding to requests:

Expand Down Expand Up @@ -483,23 +456,12 @@ We are now going to verify that a redeployment of the application does not lead
Set up the loop again to periodically check the application's response (you don't have to set the `$URL` variable again if it is still defined):

{{% onlyWhen openshift %}}
{{% onlyWhenNot baloise %}}

```bash
URL=$(oc get routes example-web-app -o go-template="{{ .spec.host }}" --namespace <namespace>)
while true; do sleep 1; curl -s http://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```

{{% /onlyWhenNot %}}
{{% onlyWhen baloise %}}

```bash
URL=$(oc get routes example-web-app -o go-template="{{ .spec.host }}" --namespace <namespace>)
while true; do sleep 1; curl -s https://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```

{{% /onlyWhen %}}

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

Expand All @@ -509,33 +471,17 @@ while true; do sleep 1; curl -s http://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N";
```

{{% /onlyWhenNot %}}
{{% onlyWhenNot baloise %}}

Windows PowerShell:

```bash
while(1) {
Start-Sleep -s 1
Invoke-RestMethod http://[URL]/pod/
Get-Date -Uformat "+ TIME: %H:%M:%S,%3N"
}
```

{{% /onlyWhenNot %}}
{{% onlyWhen baloise %}}

Windows PowerShell:

```bash
while(1) {
Start-Sleep -s 1
Invoke-RestMethod https://[URL]/pod/
Invoke-RestMethod https://<URL>/pod/
Get-Date -Uformat "+ TIME: %H:%M:%S,%3N"
}
```

{{% /onlyWhen %}}

Restart your Deployment with:

```bash
Expand Down

0 comments on commit 3755fda

Please sign in to comment.