Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

[Isito] FIX status 503 – SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED

Posted on November 20, 2021November 26, 2021 By nim No Comments on [Isito] FIX status 503 – SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED

Hệ thông istio trước giờ trước giờ vẫn đang chạy ngon.

Bỗng 1 ngày dev báo truy cập vào website thì bị chửi.

upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: TLS error: 268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED

Contents

Toggle
  • 1) Check expiration time
    • 1.1) renew certs
  • 2) Different time
    • 2.1) check time of node
    • 2.2) try to config timezone of workload
  • 3) sidecar istio-proxy
  • 4)HOW TO CONFIGURE THE LIFETIME FOR ISTIO CERTIFICATES?

1) Check expiration time

Chúng ta sẽ kiểm tra CERTIFICATE của các con:
– ingressgateway-istio.
– istio-proxy (sidecar injected to workload).

links:
https://istio.io/v1.8/docs/ops/configuration/security/root-transition/

kubectl exec [YOUR_POD] -c istio-proxy -n [YOUR_NAMESPACE] -- curl http://localhost:15000/certs | head -c 1000

Hoặc bạn exec vào container luôn và dùng câu lệnh:

http://localhost:15000/certs | head -c 1000

Như ngày hôm đó của tôi và expiration time thì cert chưa hết

1.1) renew certs

Mà nếu cert của bạn có hết hạn thì bạn run câu lệnh này. (tested on single cluster istio)

wget https://raw.githubusercontent.com/istio/tools/release-1.9/bin/root-transition.sh
chmod +x root-transition.sh
./root-transition.sh check-root

=====YOU HAVE 30 DAYS BEFORE THE ROOT CERT EXPIRES!=====

Bạn nhớ kiểm tra release-1.9 nhé
Chỗ này mình thấy nó ko có –context được nên bạn nhớ switch context của kubectl nhé.

List contexts

kubectl config get-contexts

Switch contexts

kubectl config set current-context MY-CONTEXT

Chuẩn bị mọi thứ OK rồi run thôi

./root-transition.sh root-transition
Cả 2 file old-ca-cert.pem và ca-key.pem sẽ được lưu xuống máy
Động thời istio-ca-secret sẽ được cập nhật

Bạn có thể kiểm tra lại bằng command và content của file cert.

OK nếu cert cũng chưa expirate.
Log istiod, ingressgateway, proxy-istio ko có j đặc biệt.

2) Different time

Lúc đó tôi thử redeploy proxy-istio hay ingressgateway
mình lỗi túa ra:

Ở đây nghĩ là gì Giờ của istiod và istio-proxy bị lệch nhau
Istio istiod < istio-proxy
nên cert allways expirate
failed to warm certificate: failed to generate workload certificate: create certificate: rpc error: code = Unavailable desc = connection error: desc = “transport: authentication handshake failed: x509: certificate has expired or is not yet valid: current time 2021-11-20T04:29:25Z is before 2021-11-20T11:14:51Z

2.1) check time of node

Lúc này bạn nên đi check date của các pod: istiod, ingressgateway-istio, sidecar istio-proxy.
Con nào sai giờ thì bạn có thể redeploy để nhảy sang node khác và check giờ của kube worker node ngay nhé.

2.2) try to config timezone of workload

Hoặc bạn có thể chỉnh timezone của pod “istiod, ingressgateway-istio, sidecar istio-proxy”

Bạn thêm vào environment của workload

- name: TZ
  value: Asia/Saigon

Nói chung là có nhiêu cách thì chơi hết.

POd vừa deploy mà toàn báo 7h trước thôi các bạn

Trong lúc research thấy có bài của anh Tây, chắc nào rảnh coi

https://blog.christianposta.com/diving-into-istio-1-6-certificate-rotation/

3) sidecar istio-proxy

Sau khi mà anh em check giờ ngon nghe trên istiod và istio-ingressgateway ngon nghẻ òi.
thì đôi khi các sidecar istio-proxy sẽ bị lỗi sau

Nếu bị như trên redeploy lại workload nhé anh em.

4)HOW TO CONFIGURE THE LIFETIME FOR ISTIO CERTIFICATES?

Thông tin này được lấy trang của istio

https://istio.io/latest/about/faq/security/#cert-lifetime-config
For the workloads running in Kubernetes, the lifetime of their Istio certificates is by default 24 hours.

This configuration may be overridden by customizing the proxyMetadata field of the proxy configuration. For example:

proxyMetadata:
  SECRET_TTL: 48h

Values over 90 days will not be accepted.

Isito-EnvoyFilter

Post navigation

Previous Post: [redis-cli] a few Redis commands are useful.
Next Post: [istio] Discover route inside istio

More Related Articles

[Istio/OAuth2-Proxy] Authenticate applications on Kubernetes: Okta(OIDC), Istio, and OAuth2-Proxy integration. Isito-EnvoyFilter
[istio] Discover route TCP in Cluster Istio Isito-EnvoyFilter
[VictoriaMetrics/Grafana/Prometheus/Kiali] VictoriaMetrics is a fast, cost-effective and scalable time series database Grafana
[Istio] Authenticator KubeJWTAuthenticator at index 1 got error: failed to validate the JWT from cluster – When you update K8s version 1.20 to 1.21 Isito-EnvoyFilter
[istio] Sử dụng istio-operator và istioctl để cài đặt Istio Isito-EnvoyFilter
[Istio] Security authentication và authorization with ISTIO Isito-EnvoyFilter

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [Laravel] Laravel Helpful June 26, 2025
  • [VScode] Hướng dẫn điều chỉnh font cho terminal June 20, 2025
  • [WordPress] Hướng dấn gửi mail trên WordPress thông qua gmail. June 15, 2025
  • [Bitbucket] Git Clone/Pull/Push with Bitbucket through API Token. June 12, 2025
  • [Teamcity] How to transfer the value from pipeline A to pipeline B June 9, 2025

Archives

  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2025 NimTechnology.