Last active
June 25, 2020 22:07
-
-
Save ohanetz/bf2c4ef9cc4fe47cb366de59cd37c53c to your computer and use it in GitHub Desktop.
Secure access to Kubernetes deployment endpoints on Amazon EKS
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
{ | |
"Version": "2012–10–17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": "route53:GetChange", | |
"Resource": "arn:aws:route53:::change/*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"route53:ChangeResourceRecordSets", | |
"route53:ListResourceRecordSets" | |
], | |
"Resource": "arn:aws:route53:::hostedzone/YOUR_HOSTED_ZONE_ID" | |
} | |
] | |
} |
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: v1 | |
kind: Secret | |
metadata: | |
name: letsencrypt-issuer-secret | |
namespace: cert-manager | |
data: | |
YOUR_AWS_USER: YOUR_BASE64_ENCODED_SECRET_ACCESS_KEY |
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: cert-manager.io/v1alpha2 | |
kind: ClusterIssuer | |
metadata: | |
name: letsencrypt-issuer | |
namespace: cert-manager | |
spec: | |
acme: | |
server: https://acme-v02.api.letsencrypt.org/directory | |
email: [email protected] | |
privateKeySecretRef: | |
name: letsencrypt-issuer | |
solvers: | |
- selector: | |
dnsZones: | |
- "yourdomain.com" | |
dns01: | |
route53: | |
region: YOUR_AWS_REGION | |
hostedZoneID: YOUR_HOSTED_ZONE_ID | |
accessKeyID: YOUR_AWS_ACCESS_KEY_ID | |
secretAccessKeySecretRef: | |
name: letsencrypt-issuer-secret | |
key: YOUR_AWS_USER |
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/v1beta1 | |
kind: Ingress | |
metadata: | |
name: my-ingress | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
cert-manager.io/cluster-issuer: "letsencrypt-issuer" | |
spec: | |
tls: | |
- hosts: | |
- yourhost.yourdomain.com | |
secretName: my-ingress-tls | |
rules: | |
- host: yourhost.yourdomain.com | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: YOUR_ENDPOINT_SERVICE_NAME | |
servicePort: YOUR_ENDPOINT_SERVICE_PORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment