以下のようなスクリプトを profile.ps1 というファイル名で保存して
C:\Users\<ユーザー名>\Documents\WindowsPowerShell\
に配置する。
(PowerShell Coreの場合はインストールディレクトリ直下)
profile.ps1
function prompt() {
$current_dir = Split-Path -Leaf (Get-Location)
$context = kubectl config current-context
"[$current_dir]($context) > "
}
この例ではカレントディレクトリをあわせて表示しているが、
kubectl config current-context
の結果が利用できればよいのであとはお好みで。
簡単ですが以上です。