Last active
June 6, 2018 16:13
-
-
Save r7vme/078222953e5336ac622ba8d2f61c7a8e to your computer and use it in GitHub Desktop.
calicoctl.yaml
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
# How to use: | |
# 1) check calico version and uncomment proper image version below. By default for calico 3.0+ | |
# 2) kubectl apply -f calicoctl.yaml | |
# 3) kubectl exec -ti -n kube-system calicoctl -- /calicoctl get nodes | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: calicoctl | |
namespace: kube-system | |
spec: | |
nodeSelector: | |
node-role.kubernetes.io/master: "" | |
hostNetwork: true | |
tolerations: | |
- key: node-role.kubernetes.io/master | |
operator: Exists | |
effect: NoSchedule | |
containers: | |
- name: calicoctl | |
# For old clusters with Calico 2.6+ | |
#image: quay.io/calico/ctl:v1.6.3 | |
# For new clusters with Calico 3.0+ | |
image: quay.io/calico/ctl:v2.0.1 | |
# To check Calico version: | |
# kubectl get ds/calico-node -n kube-system -o yaml | grep "image:" | |
command: ["/bin/sh", "-c", "while true; do sleep 3600; done"] | |
env: | |
- name: ETCD_ENDPOINTS | |
value: https://127.0.0.1:2379 | |
- name: ETCD_CA_CERT_FILE | |
value: /etc/kubernetes/ssl/etcd/client-ca.pem | |
- name: ETCD_CERT_FILE | |
value: /etc/kubernetes/ssl/etcd/client-crt.pem | |
- name: ETCD_KEY_FILE | |
value: /etc/kubernetes/ssl/etcd/client-key.pem | |
volumeMounts: | |
# Mount in the etcd TLS secrets. | |
- mountPath: /etc/kubernetes/ssl/etcd | |
name: etcd-certs | |
volumes: | |
# Mount in the etcd TLS secrets. | |
- name: etcd-certs | |
hostPath: | |
path: /etc/kubernetes/ssl/etcd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment