Skip to content

Instantly share code, notes, and snippets.

View calvin-puram's full-sized avatar
🎯
Focusing

Calvin Job Puram calvin-puram

🎯
Focusing
View GitHub Profile
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: "calvinpuram.com"
http:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mongo-express-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: "your elb DNS name"
http:
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongo-express-deployment
labels:
app: mongo-express
spec:
replicas: 1
selector:
matchLabels:
helm install [our name] --values [values file name] [chart name]
architecture: replicaset
replicaCount: 3
# We're testing, so 1Gi is fine
persistence:
size: 1Gi
# Use the initContainer to change permissions for us so Mongo can write to the volume
volumePermissions.enabled: true
# Use the storageClass we created earlier
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
# We can use any name so long as we reference it correctly
name: standard
# Tell k8s this is our default storageClass
annotations:
storageclass.kubernetes.io/is-default-class: "true"
openssl rand -base64 756 > key.txt
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
provider "kubernetes" {
host = data.aws_eks_cluster.myapp_cluster.endpoint
token = data.aws_eks_cluster_auth.myapp_cluster.token
cluster_ca_certificate = base64decode(data.aws_eks_cluster.myapp_cluster.certificate_authority.0.data)
}
data "aws_eks_cluster" "myapp_cluster" {
name = module.eks.cluster_id
}