Skip to content
Advertisement

Kubeclt exec issues with variable via php script

New to kubernetes and php, so I’m having some issues. Any and all help is greatly appreciated!

JavaScript

results in error

JavaScript

When switching '.$postgres_pod.' for postgres-7957478b7d-tmw6m as below – it executes fully

JavaScript

Thanks – Mike

Advertisement

Answer

There can sometimes be extra whitespace before or after strings, especially return characters which don’t always show up when echoing the result.

Using trim($postgres_pod) will ensure they are removed.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement