Skip to content

Instantly share code, notes, and snippets.

View matiasah's full-sized avatar

Matías Hermosilla matiasah

View GitHub Profile
@matiasah
matiasah / lombok-sonarqube-findings.md
Created April 7, 2022 23:20
How to remove Lombok Code Smells/Issues or findings from SonarQube
@matiasah
matiasah / pkix.md
Created January 14, 2022 18:57
Fix PKIX exception in Java

How to fix PKIX exception in Java

Import the site's certificate into the cacerts.

Without proxy Java 11:

%JAVA11_HOME%/bin/keytool -delete -noprompt -alias <site> -storepass changeit -cacerts
%JAVA11_HOME%/bin/keytool -printcert -rfc -sslserver <site>:443 > %CERT_PATH%/<site>.pem
%JAVA11_HOME%/bin/keytool -importcert -file %CERT_PATH%/<site>.pem -alias <site> -storepass changeit -cacerts -noprompt
@matiasah
matiasah / kubernetes-backend-pipeline.md
Last active May 12, 2021 01:18
Kubernetes Backend Pipeline (GitLab Runner)

Environment variables

Environment variable Description
KUBECONFIG Address pointing to the kubeconfig.yaml file

Pipeline

.gitlab-ci.yml

image: docker:latest
@matiasah
matiasah / kubernetes-frontend-pipeline.md
Last active May 12, 2021 01:23
Kubernetes Frontend Pipeline (Gitlab Runner)

Environment variables

Environment variable Description
KUBECONFIG Address pointing to the kubeconfig.yaml file

Pipeline

.gitlab-ci.yml

image: docker:latest
@matiasah
matiasah / cloudfront-s3-pipeline.md
Last active May 12, 2021 01:09
CloudFront + S3 Pipeline (Gitlab Runner)

Environment variables

Environment variable Description
AWS_ACCESS_KEY_ID Access key of the IAM account
AWS_SECRET_ACCESS_KEY Secret key of the IAM account
AWS_REGION Region of the Elastic Beanstalk instance
S3_BUCKET_NAME Name of the S3 bucket
CDN_DISTRIBUTION_ID Id. of the CloudFront distribution
@matiasah
matiasah / elastic-beanstalk-pipeline-gitlab-runner.md
Last active May 12, 2021 01:06
Elastic Beanstalk Pipeline (Gitlab Runner)

Environment variables

Environment variable Description
AWS_ACCESS_KEY_ID Access key of the IAM account
AWS_SECRET_ACCESS_KEY Secret key of the IAM account
AWS_REGION Region of the Elastic Beanstalk instance
ELASTIC_BEANSTALK_ENV Name of the elastic beanstalk environment

Pipeline

@matiasah
matiasah / gitlab-runner.md
Last active February 4, 2021 04:02
Instalar GitLab Runner
@matiasah
matiasah / ingress-kube-api-server.md
Last active March 7, 2021 20:11
Implementar recurso Ingress para kube-apiserver

Crear ClusterIssuer 'staging' de nginx

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-staging
spec:
  acme:
    email: «correo»
    preferredChain: ""
@matiasah
matiasah / image-registry-kubernetes.md
Last active June 6, 2023 03:03
Configure a Container Image Registry with Kubernetes
  1. To authenticate to the private registry
docker login registry.gitlab.com
  1. Create the docker authentication credential as a Kubernetes secret (regcred)
kubectl create secret generic regcred \
    --from-file=.dockerconfigjson=$HOME/.docker/config.json \
    --type=kubernetes.io/dockerconfigjson \
@matiasah
matiasah / nginx-ingress.md
Last active January 30, 2021 02:30
Configurar controlador Ingress Kubernetes
  1. Instalar Ingress Controller de Nginx utilizando Helm
    https://kubernetes.github.io/ingress-nginx/deploy/

  2. Configurar tipo de servicio a 'NodePort'

kubectl patch svc ingress-nginx-controller -p '{"spec": {"type": "NodePort"}}'
  1. Configurar dirección IP externa (pública) del servicio 'ingress-nginx-controller'