applescript: Appropriately escape input in script invocation

Here is what worked for me:

assuming that you grab input by having as a first line in your script the following:

on run {input}

Then you can perform within an iTerm window:

write text "watch -n1 " & "'"  & "kubectl get pods | grep -i " & input & "'"