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
| https://yuswitayudi.github.io |
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
| for i in yuswitayudi | |
| do | |
| openssl genrsa -out $i.key 2048 | |
| openssl req -new -key $i.key -out $i.csr -subj "/CN=$i/O=finance" | |
| openssl x509 -req -in $i.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out $i.crt -days 365 | |
| kubectl --kubeconfig $i.config config set-cluster kubernetes-dev --server https://192.168.1.223:6443 --certificate-authority=ca.crt | |
| kubectl --kubeconfig $i.config config set-credentials $i --client-certificate $i.crt --client-key $i.key | |
| kubectl --kubeconfig $i.config config set-context $i-dev --cluster kubernetes-dev --namespace dev --user=$i | |
| kubectl --kubeconfig $i.config config use-context $i-dev | |
| kubectl create role $i-dev --verb=* --resource=*.* --namespace dev |
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/v1 | |
| kind: ClusterIssuer | |
| metadata: | |
| name: letsencrypt-staging | |
| namespace: cert-manager | |
| spec: | |
| acme: | |
| # The ACME server URL | |
| server: https://acme-staging-v02.api.letsencrypt.org/directory | |
| # Email address used for ACME registration |
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/v1 | |
| kind: ClusterIssuer | |
| metadata: | |
| name: letsencrypt-prod | |
| namespace: cert-manager | |
| spec: | |
| acme: | |
| # The ACME server URL | |
| server: https://acme-v02.api.letsencrypt.org/directory | |
| # Email address used for ACME registration |
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: RELEASE-NAME-demo | |
| labels: | |
| helm.sh/chart: demo-0.1.0 | |
| app.kubernetes.io/name: demo | |
| app.kubernetes.io/instance: RELEASE-NAME | |
| app.kubernetes.io/version: "k8s" | |
| app.kubernetes.io/managed-by: Helm |
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
| #!/bin/bash | |
| # Get your API key from https://www.cloudflare.com/a/account/my-account | |
| API_KEY="your-api-key" | |
| EMAIL="your.email@example.com" | |
| # Strip only the top domain to get the zone id | |
| DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)') | |
| # Get the Cloudflare zone id |
OlderNewer