#!/bin/bash

MasterNodes='k8s-master01 k8s-master02 k8s-master03'
WorkNodes='k8s-node01 k8s-node02 k8s-node03'
for NODE in $MasterNodes; do
     #sshpass ssh -p 22 root@$NODE "mkdir -p /etc/etcd/ssl"
     for FILE in etcd-ca-key.pem  etcd-ca.pem  etcd-key.pem  etcd.pem; do
        sshpass scp -P 22 -r /etc/etcd/ssl/${FILE} root@$NODE:/etc/etcd/ssl/${FILE}
     done
done
