Skip to content

Instantly share code, notes, and snippets.

View initcron's full-sized avatar

Gourav Shah initcron

View GitHub Profile
@initcron
initcron / ssh_config
Created July 10, 2024 04:26
Connect to a server in private network (Private subnets of VPC) ~/.ssh/config
Host public
Hostname x.x.x.x
User ubuntu
IdentityFile ~/.ssh/path_to_key1.pem
Host private
HostName y.y.y.y
User ec2-user
ProxyCommand ssh -W %h:%p public
@initcron
initcron / vote-ci-template.yaml
Created June 3, 2024 15:59
Workflow Template for Vote CI
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: vote-ci-template
namespace: argo-events
spec:
entrypoint: main
serviceAccountName: default
arguments:
parameters:
@initcron
initcron / argo-rbac.yaml
Last active June 3, 2024 11:35
RBAC for Argo Role to run Workflows from argo-events namespace
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo
namespace: argo-events
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
@initcron
initcron / recreate-cluster-day4.md
Created May 31, 2024 02:41
Recreating EKS Environment for Day 4

Start by creating the cluster from the path where cluster.yaml is

eksctl create cluster -f cluster.yaml --without-nodegroup

once created, launch the node group as

eksctl create nodegroup -f cluster.yaml --include=ng-2-workers
- name: ng-2-workers
labels: { role: workers }
instanceType: t3.small
desiredCapacity: 2
minSize: 1
maxSize: 4
maxPodsPerNode: 17
ssh:
allow: true
publicKeyName: xxxxxxx
@initcron
initcron / recreating_eks_cluster.md
Last active May 30, 2024 03:56
Day 3 - Recreating EKS Cluster

Start by creating the cluster from the path where cluster.yaml is

eksctl create cluster -f cluster.yaml --without-nodegroup

once created, launch the node group as

eksctl create nodegroup -f cluster.yaml --include=ng-2-workers
@initcron
initcron / cluster.yaml
Created May 29, 2024 03:06
EKS Cluster Config with two node groups. Launch with => eksctl create nodegroup -f cluster.yaml --include=ng-1-workers
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: eks-cluster-01
region: ap-southeast-1
vpc:
id: "vpc-0f001c1415b1ae568"
subnets:
@initcron
initcron / cluster.yaml
Created May 28, 2024 07:48
EKS Cluster Config
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: eks-cluster-01
region: ap-southeast-1
vpc:
id: "vpc-aaaa"
subnets:
@initcron
initcron / cluster-autoscaler-autodiscover.yaml
Created May 23, 2024 10:34
Kubernetes Cluster Autoscaler for AWS EKS
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-addon: cluster-autoscaler.addons.k8s.io
k8s-app: cluster-autoscaler
name: cluster-autoscaler
namespace: kube-system
---

Scenario

Imagine we have a parent chart and a child chart. Each has a configuration value named replicaCount, which specifies the number of replicas for a deployment. We want to be able to override this value for different environments using separate files.

Directory Structure

parent/
  - charts/
    - child/