#!/bin/bash

NODE="k8s-master01"
master_ip=`cat /etc/hosts | grep "$NODE" | awk -F " " '{print $1}'`
echo $master_ip
echo "sshpass ssh -p $ssh_port root@$NODE \"sed -i 's/masterip/$master_ip/g' /etc/etcd/etcd.config.yml\""
