Skip to content

Instantly share code, notes, and snippets.

View Nikila99gimhan's full-sized avatar
🚩
Working from home

nikila Fernando Nikila99gimhan

🚩
Working from home
View GitHub Profile
@Nikila99gimhan
Nikila99gimhan / cka-notes.md
Last active September 25, 2023 18:08
CKA Notes

1. ETCD Backup and Restore

Backup:

To backup an etcd cluster, you can use the etcdctl snapshot save command.

ETCDCTL_API=3 etcdctl snapshot save backup.db \
  --endpoints=https://127.0.0.1:2379 \
 --cacert=/path/to/cacert.pem \
# Logs in to the Azure Container Registry
- uses: Azure/docker-login@v1
with:
login-server: ${{ env.AZURE_CONTAINER_REGISTRY }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
# Build and push image to Azure Container Registry
- name: Build and push image to Azure Container Registry
run: |
apiVersion: v1
kind: Service
metadata:
name: learning-management-system
namespace: default
spec:
selector:
app: lms
ports:
- name: http
apiVersion: apps/v1
kind: Deployment
metadata:
name: learning-management-system
namespace: default
labels:
app: lms
spec:
replicas: 1
selector:
name: AKS Deployment
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
AZURE_CONTAINER_REGISTRY: "repo.azurecr.io"