Skip to content

Instantly share code, notes, and snippets.

View moinuddin14's full-sized avatar
🎯
Focusing

Khaja Moinuddin Mohammed moinuddin14

🎯
Focusing
  • Hyderabad, INDIA
View GitHub Profile
@moinuddin14
moinuddin14 / ssm-automation.yaml
Created September 21, 2023 09:07
ssm-automation.yaml
---
description: 'Push Sample File to Multiple EC2 Instances Across AWS Accounts'
schemaVersion: '2.2'
description: 'This automation document pushes a sample file to EC2 instances across different AWS accounts.'
assumeRole: 'arn:aws:iam::ACCOUNT_ID:role/CrossAccountRole'
parameters:
instanceIds:
type: 'StringList'
description: 'List of EC2 instance IDs to which the file will be pushed.'
accounts:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
image: python:3.7.3
pipelines:
default:
- step:
name: Build and Test
script:
- pipe: atlassian/aws-cli:1.16.283
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
@moinuddin14
moinuddin14 / terraform-aws-rds-postgres-instance.tf
Created December 13, 2022 06:54
Terraform snippet here that would instantiate a Postgres RDS in AWS (Sydney region)
# Have the provider and terraform block of code in a file called provider.tf
provider "aws" {
region = "ap-southeast-2"
}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.16"
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1665504301448",
"Action": [
"kms:CancelKeyDeletion",
"kms:ConnectCustomKeyStore",
"kms:CreateAlias",
"kms:CreateCustomKeyStore",
@moinuddin14
moinuddin14 / k8s-labels-selectors-annotations.yml
Last active May 27, 2022 05:02
This gist consists of examples for Kubernetes Labels, Selectors and Annotations
---
# Labels with prefix
apiVerion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: redpod
app.kubernetes.io/version: 1.24
# Labels without prefix
@moinuddin14
moinuddin14 / configmap-secrets.yaml
Created April 13, 2022 01:38
This is an example gist to understand ConfigMap and Secrets in Kubernetes
---
# ConfigMap with different ways of data usage
apiVersion: v1
kind: ConfigMap
metadata:
name: game-demo
data:
# property-like keys; each key maps to a simple value
player_initial_lives: "3"
ui_properties_file_name: "user-interface.properties"
@moinuddin14
moinuddin14 / exec-liveness.yaml
Created April 6, 2022 05:57
Define a liveness command, http request, TCP probe and gRPC probe
apiVersion: v1
kind: Pod
metadata:
labels:
test: liveness
name: liveness-exec
spec:
containers:
- name: liveness
image: k8s.gcr.io/busybox
@moinuddin14
moinuddin14 / cmc1-2022.md
Created March 25, 2022 16:57
CMC# 1 Agenda

Agenda - 2nd April, Saturday

Quiz tool - Kahoot 2 Tracks in this conference

Organizers list - Khaja - Aarthi

@moinuddin14
moinuddin14 / kind-ha-cluster-config.yaml
Created March 24, 2022 16:20
This gist correspond to the Kind cluster with High Availbaility
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
apiServerAddress: "0.0.0.0"
disableDefaultCNI: false
# kubeadmConfigPatches:
# - |
# apiVersion: kubeadm.k8s.io/v1beta2
# kind: ClusterConfiguration
# metadata: