This file contains hidden or 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
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: nginx-ingress | |
| annotations: | |
| kubernetes.io/ingress.class: nginx | |
| spec: | |
| rules: | |
| - host: "calvinpuram.com" | |
| http: |
This file contains hidden or 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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx-deployment | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: nginx | |
| replicas: 1 | |
| template: |
This file contains hidden or 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
| 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: |
This file contains hidden or 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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: mongo-express-deployment | |
| labels: | |
| app: mongo-express | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: |
This file contains hidden or 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
| helm install [our name] --values [values file name] [chart name] |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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" |
This file contains hidden or 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
| openssl rand -base64 756 > key.txt |
This file contains hidden or 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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx-deployment | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: nginx | |
| replicas: 1 | |
| template: |
This file contains hidden or 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
| 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 | |
| } |