Run a PowerShell script on Azure AKS nodes

%3CLINGO-SUB%20id%3D%22lingo-sub-2689781%22%20slang%3D%22en-US%22%3ERun%20a%20PowerShell%20script%20on%20Azure%20AKS%20nodes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2689781%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20PowerShell%20script%20that%20I%20want%20to%20run%20on%20some%20Azure%20AKS%20nodes%2C%20running%20windows%2C%20to%20deploy%20a%20security%20tool.%20There%20is%20no%20Daemonset%20for%20this%20by%20the%20software%20vendor%2C%20but%20instead%20it%20is%20a%20powershell%20script.%20How%20would%20I%20deploy%20it%20on%20these%20cluster%20nodes%20%3F%3C%2FP%3E%3CP%3EThanks%20a%20million%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EDel%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2690143%22%20slang%3D%22en-US%22%3ERe%3A%20Run%20a%20PowerShell%20script%20on%20Azure%20AKS%20nodes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2690143%22%20slang%3D%22en-US%22%3EHey%2C%3CBR%20%2F%3E%3CBR%20%2F%3Ealthough%20there%20could%20be%20ways%20to%20do%20this%2C%20i%20would%20recommend%20that%20you%20dont.%20The%20reason%20is%20that%20your%20AKS%20setup%20should%20not%20allow%20execute%20scripts%20inside%20container%20directly%20on%20AKS%20nodes.%20This%20would%20imply%20a%20huge%20security%20issue%20IMO.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20suggest%20to%20find%20a%20way%20the%20execute%20your%20script%20directly%20on%20your%20nodes%2C%20for%20example%20with%20PowerShell%20remoting%20or%20any%20way%20that%20suits%20you.%3CBR%20%2F%3E%3CBR%20%2F%3EBR%2C%3CBR%20%2F%3EPhilip%3C%2FLINGO-BODY%3E
Occasional Visitor

I have a PowerShell script that I want to run on some Azure AKS nodes, running windows, to deploy a security tool. There is no Daemonset for this by the software vendor, but instead it is a powershell script. How would I deploy it on these cluster nodes ?

Thanks a million 

 

Del

1 Reply
Hey,

although there could be ways to do this, i would recommend that you dont. The reason is that your AKS setup should not allow execute scripts inside container directly on AKS nodes. This would imply a huge security issue IMO.

I suggest to find a way the execute your script directly on your nodes, for example with PowerShell remoting or any way that suits you.

BR,
Philip