Last active
July 30, 2020 14:16
-
-
Save jamcole/ae151ac39cd6e9292f317dcbf5df4138 to your computer and use it in GitHub Desktop.
Seamlessly Load CAs from ConfigMap into k8s Pods with InitContainer
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
initContainers: | |
- args: | |
- -c | |
- cp | |
/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt | |
/usr/share/pki/ca-trust-source/anchors/k8s && mkdir -p | |
/etc/pki/ca-trust/extracted/pem | |
/etc/pki/ca-trust/extracted/openssl | |
/etc/pki/ca-trust/extracted/java && update-ca-trust | |
command: | |
- /bin/bash | |
image: rhel7/support-tools:7.6 | |
imagePullPolicy: IfNotPresent | |
name: update-certs | |
volumeMounts: | |
- mountPath: /usr/share/pki/ca-trust-source/anchors/ca | |
name: ca-anchors | |
- mountPath: /usr/share/pki/ca-trust-source/anchors/k8s | |
name: k8s-ca-anchors | |
- mountPath: /etc/pki/ca-trust/extracted | |
name: ca-extracted | |
# skipped... | |
volumes: | |
- configMap: | |
name: ca-anchors | |
name: ca-anchors | |
- emptyDir: {} | |
name: k8s-ca-anchors | |
- emptyDir: {} | |
name: ca-extracted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment