Last active
December 2, 2019 22:21
-
-
Save dnmgns/b5de30860e232230588a3b0fe83ee29e to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
mkdir -p /etc/kubernetes/manifests/ | |
cp /etc/kubernetes/manifests/kube-apiserver.yaml /tmp/kubeadm-patches/ | |
cat >/tmp/kubeadm-patches/kustomization.yaml <<EOF | |
resources: | |
- kube-apiserver.yaml | |
patchesJson6902: | |
- target: | |
version: v1 | |
kind: Pod | |
name: kube-apiserver | |
path: add-service-account-key-file.yaml | |
EOF | |
cat >/tmp/kubeadm-patches/add-service-account-key-file.yaml <<EOF | |
- op: add | |
path: /spec/containers/0/command/- | |
value: --service-account-key-file=/tmp/additional-issuer.pub | |
EOF | |
kubectl kustomize /tmp/kubeadm-patches/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment