本文へ移動
cccskills
無料GitHub で公開

openshift:trusted-ca-bundle

Use OpenShift's trusted CA bundle for TLS verification in pods

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctlスター 303(GitHub 303 + cccskills 0)
連携ツールKubernetes

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

OpenShift Trusted CA Bundle

Use OpenShift's automatically-managed trusted CA bundle for TLS verification in pods.

Table of Contents

Overview

OpenShift automatically creates a ConfigMap named config-trusted-cabundle in each namespace that contains the cluster's trusted CA certificates. This is useful for services that need to verify TLS connections to internal services or external endpoints.

Pre-existing ConfigMap

OpenShift automatically maintains this ConfigMap:

apiVersion: v1
kind: ConfigMap
metadata:
  name: config-trusted-cabundle
  namespace: <any-namespace>
data:
  ca-bundle.crt: |
    -----BEGIN CERTIFICATE-----
    # ... certificates ...
    -----END CERTIFICATE-----

Important: This ConfigMap exists automatically in every namespace. Do NOT create it manually.

Volume Mount Pattern

Mount the CA bundle in your pod:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-service
spec:
  template:
    spec:
      containers:
        - name: my-service
          volumeMounts:
            - name: trusted-ca
              mountPath: /etc/pki/ca-trust/extracted/pem
              readOnly: true
      volumes:
        - name: trusted-ca
          configMap:
            name: config-trusted-cabundle
            items:
              - key: ca-bundle.crt
                path: tls-ca-bundle.pem

Usage in Applications

Python (requests)

import requests

response = requests.get(
    "https://internal-service.example.com",
    verify="/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"
)

Python (python-keycloak)

from keycloak import KeycloakAdmin

keycloak_admin = KeycloakAdmin(
    server_url="https://keycloak.example.com",
    verify="/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"
)

OTEL Collector

extensions:
  oauth2client/mlflow:
    token_url: https://keycloak.example.com/realms/master/protocol/openid-connect/token
    tls:
      ca_file: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem

curl

curl --cacert /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem \
  https://internal-service.example.com

Anti-Pattern: Creating ConfigMap with Injection

Do NOT create a ConfigMap with the injection annotation:

# DON'T DO THIS
apiVersion: v1
kind: ConfigMap
metadata:
  name: my-custom-ca-bundle
  annotations:
    service.beta.openshift.io/inject-cabundle: "true"
data: {}

Why: The injection annotation doesn't inject certificates immediately. The ConfigMap may be empty when the pod starts, causing TLS failures.

Best Practices

1. Use Internal URLs When Possible

Avoid TLS complexity entirely by using internal service URLs:

# Instead of external URL
KEYCLOAK_URL: "https://keycloak.apps.example.com"

# Use internal URL
KEYCLOAK_URL: "http://keycloak-service.keycloak.svc.cluster.local:8080"

2. Conditional TLS Based on Platform

{{- if eq .Values.global.platform "ocp" }}
tls:
  ca_file: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
{{- end }}

3. Check CA Bundle Exists

kubectl exec -it <pod> -- ls -la /etc/pki/ca-trust/extracted/pem/

Helm Chart Integration

{{- if .Values.global.openshift.enabled }}
spec:
  template:
    spec:
      containers:
        - name: {{ .Chart.Name }}
          volumeMounts:
            - name: trusted-ca
              mountPath: /etc/pki/ca-trust/extracted/pem
              readOnly: true
      volumes:
        - name: trusted-ca
          configMap:
            name: config-trusted-cabundle
            items:
              - key: ca-bundle.crt
                path: tls-ca-bundle.pem
{{- end }}

Troubleshooting

Certificate Verify Failed

ssl.SSLCertVerificationError: certificate verify failed
  1. Check if CA bundle is mounted:
kubectl exec -it <pod> -- cat /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
  1. Verify application is using the correct path

  2. Consider using internal HTTP URL instead

ConfigMap Not Found

Error: configmap "config-trusted-cabundle" not found

This shouldn't happen on OpenShift. Check if:

  • You're actually running on OpenShift (not Kind/vanilla k8s)
  • The namespace exists and is active

Empty CA Bundle

If the ConfigMap exists but is empty:

  • Check OpenShift cluster CA configuration
  • Contact cluster administrator

Platform Differences

PlatformCA Bundle Availability
OpenShiftAutomatic (config-trusted-cabundle)
KindNot available (use internal URLs)
Vanilla k8sNot available (manual configuration needed)

Related Skills

  • auth:keycloak-confidential-client
  • auth:otel-oauth2-exporter

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

auth

無料

Authentication and authorization patterns for Rossoctl services

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

Create confidential OAuth2 clients in Keycloak for server-to-service authentication

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

Configure MLflow with mlflow-oidc-auth plugin for Keycloak OIDC authentication

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

Configure OpenTelemetry Collector with OAuth2 authentication for trace export

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

ci

無料

CI pipeline monitoring, status checks, and PR validation workflows

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

Monitor running CI jobs, wait for completion, create tasks for results

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

rossoctl のスキルをすべて見る

このスキルの問題を報告する