This repo contains all the concepts useful to brush up your knowledge in enterprise software development and DevOps.
https://kubernetes.io/docs/concepts/overview/components/ official docs, very useful overview
az acr build --resource-group <rg> --registry <acr> --image <image>:<tag> .upload image to registry
helm repo add bitnami https://charts.bitnami.com/bitnamiadd a helm repohelm search repo bitnamilist available images
kubectl create secretto keep and spread secretskubectl get endpoints ratings-api --namespace ratingsappsee what you are exposingkubectl config delete-context <context_name>clean kubeconfig contextkubectl config set-context <ctx_name> --namespace=<ns>create a new contextkubectl config use-context <ctx_name>use context as defaultkubectl port-forward [<pod-name> or services/<service-name>] 8080:80forward local traffic, to pod or load balancerkubectl cp <pod-name>:<filepath> <filepath>copy file to local machinekubectl cp $HOME/<filepath> <pod-name>:<filepath>copy file from remote machine$ kubectl get deployments kuard --export -o yaml > kuard-deployment.yaml $ kubectl replace -f kuard-deployment.yaml --save-configexport a deployment into a file and then store changeskubectl run -i oneshotrun a single job oncekubectl proxysimilar to port forward, but instead of sending TCP traffic you send HTTP requests, port forward is for internal access and debugging, proxy is to forward traffickubectl top nodestopkubectl expose deployment <my-deplo>To create a servicek get deploy kuard-deployment -o jsonpath --template {.spec.selector.matchLabels}Which labels is my deployment matching?kubectl replace -f <filename> --save-configReplace the deployment in the file and save the modified config in its annotationkubectl rollout status deployments <deployment-name>Check the rollout statuskubectl label <resource>____k create configmap test-config --from-file=test-config.txt --from-literal=extra-param=extra-value --from-literal=another-param=another-valueCreate ConfigMapk create secret generic <name> --from-file=<filename>____kubectl replace -f -Read file from stdin and use it to replace a resource (fx. create with --dry-run -o yaml and then use this to update a secret from files on disk without having to manually base64-encode data)kubectl auth can-i get pods --subresource=logsCan if I'm auth to do a verbkubectl auth reconcileReapply RBAC changeskubectl run -it --rm --image busybox busybox ping <svc dns name>Run pod interactively and ping
Examples: KUARD_LB=$(kubectl get service kuard -o jsonpath='{.status.loadBalancer.ingress[*].hostname}') query a specific deployment for a parameter
terraform init --backend-config="<key>=<value>"____terraform apply -var="<key>=<value>"pass sensitive variqables from command lineterraform showlook the current state of the infrastructureTF_VAR_<variable>this environment-variable can be set to set the terraform variable.terraform state listlist all resources provisioned via terraformterraform plan -out=newplanwrite the plan into file, you can follow this with <terraform apply "newplan"terraform validatespellcheck tf files- `` ____
docker run -d --name kuard --publish 8080:8080 gcr.io/kuar-demo/kuard-amd64:blue____docker stop kuard____docker system prunedelete all untagged images, all stopped containers etc