Snippets Collections
kubectl exec --stdin --tty <<PODNAME>>> -n cnext-di-tst  -- /bin/bash
$RG = "di-platform-dev-rg-execution"
$NAME = "di-platform-dev-k8s-exe"

$SP_ID=$(az aks show --resource-group "$RG" --name "$NAME" \
    --query servicePrincipalProfile.clientId -o tsv)

az ad sp credential list --id "$SP_ID" --query "[].endDate" -o tsv

$SP_ID=$(az aks show --resource-group "$RG" --name "$NAME" \
    --query servicePrincipalProfile.clientId -o tsv)

$SP_SECRET=$(az ad sp credential reset --name "$SP_ID" --query password -o tsv)

az aks update-credentials \
    --resource-group "$RG" \
    --name $NAME" \
    --reset-service-principal \
    --service-principal "$SP_ID" \
    --client-secret "$SP_SECRET"
kubectl get pods -l env=dev --no-headers | wc -l
alias k=kubectl
complete -F __start_kubectl k
# setup autocomplete in bash into the current shell, bash-completion package should be installed first.
source <(kubectl completion bash) 
# add autocomplete permanently to your bash shell.
echo "source <(kubectl completion bash)" >> ~/.bashrc 
# Display the list of context
kubectl config get-contexts   
# Display the current-context
kubectl config current-context
# Change context to my-cluster-name
kubectl config use-context my-cluster-name
# Get nodes
kubectl get nodes
# Get pods
kubectl get pods
# Execute bash in a specific pod
kubectl exec -it pod-name -- /bin/bash
$ docker run -d \
  --name realopinsight \
  --network host \
  --publish 4583:4583 \
  rchakode/realopinsight
star

Thu Nov 04 2021 13:18:02 GMT+0000 (UTC) https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/

#k8s #shell #pod
star

Mon Oct 25 2021 17:48:18 GMT+0000 (UTC) https://docs.microsoft.com/en-us/azure/aks/update-credentials?WT.mc_id=Portal-Microsoft_Azure_Expert#update-aks-cluster-with-new-service-principal-credentials

#powershell #k8s #spn #reset #expired #expire
star

Fri Oct 15 2021 13:56:53 GMT+0000 (UTC)

#k8s
star

Thu Oct 07 2021 08:11:37 GMT+0000 (UTC) https://kubernetes.io/docs/reference/kubectl/cheatsheet/

#k8s #kubernetes
star

Thu Oct 07 2021 08:10:52 GMT+0000 (UTC) https://kubernetes.io/docs/reference/kubectl/cheatsheet/

#k8s #kubernetes
star

Fri Mar 19 2021 15:30:42 GMT+0000 (UTC) https://kubernetes.io/fr/docs/reference/kubectl/cheatsheet/

#k8s

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension