This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################### | |
######### DISABLING SERVICES ######### | |
###################################### | |
# view running services | |
systemctl | grep running | |
# view state of snapd service | |
systemctl status snapd | |
# stop the snapd service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Deploy the AKS cluster | |
az aks create --resource-group myResourceGroup --name myAKSCluster \ | |
--node-count 1 --enable-addons monitoring --generate-ssh-keys \ | |
--service-principal "208-1029....." --client-secret "ba208-2......" | |
# Set the context for kubectl | |
az aks get-credentials --resource-group myaks-rg --name aksdeepdive | |
# Create a deployment | |
kubectl run nodeapp --image=aksdeepdive.azurecr.io/node:v1 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ASP.NET | |
# Build and test ASP.NET projects. | |
# Add steps that publish symbols, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 | |
trigger: | |
- master | |
stages: | |
- stage: Build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# perform the commands from the following site: | |
# https://studyk8s.club/cka-warmup | |
# list all the api resources | |
k api-resources | |
# help menu is your friend | |
k -h | |
# help menu goes many levels deep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
kind create cluster —image kindest/node:v1.28.0 --name kind128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use the following lab environment: | |
# https://studyk8s.club/cka-configmaps | |
# create the configmap | |
cat << EOF > redis-configMap.yaml | |
apiVersion: v1 | |
data: | |
redis-config: | | |
maxmemory: 2mb | |
maxmemory-policy: allkeys-lru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# perform the commands from this lab environment: | |
# https://studyk8s.club/cka-logging | |
# create a pod that will output logs to stdout | |
cat << EOF > pod-logging.yaml | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod-logging | |
spec: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# perform the command from this lab environment: | |
# https://studyk8s.club/cka-upgrade-k8s | |
# plan the upgrade | |
kubeadm upgrade plan | |
# upgrade the version of kubeadm | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https ca-certificates curl gpg | |
mkdir -p /etc/apt/keyrings/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# perform the commands from the following lab environment: | |
# https://studyk8s.club/cka-new-user | |
# view the config | |
k config-view | |
cat ~/.kube/config | |
echo $KUBECONFIG | |
cat /etc/kubernetes/admin.conf | |
# list the cluster users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# perform the commands from the following lab environment: | |
# https://studyk8s.club/cka-ectd-backup | |
# set etcdctl environment variable api to version 3 | |
export ECTDCTL_API=3 | |
# etcd help menu | |
etcdctl snapshot -h | |
# backup etcd |
NewerOlder