Skip to content

Instantly share code, notes, and snippets.

@hiramhuang
Last active November 17, 2015 06:51
Show Gist options
  • Save hiramhuang/2f85d4e7c7fd41288ba8 to your computer and use it in GitHub Desktop.
Save hiramhuang/2f85d4e7c7fd41288ba8 to your computer and use it in GitHub Desktop.
#!/bin/bash
yum -y update
# Install ntp (Network Time Protocol)
yum -y install ntp
# Install EPEL
yum -y install epel-release
# Install etcd, kubernetes
yum -y install etcd kubernetes
# Replace 10.254.0.0 to 192.168.0.0
sed -n 's/10.254.0.0/192.168.0.0/' /etc/kubernetes/apiserver
# Start end enable all service
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler ntpd; do
systemctl restart $SERVICES
systemctl enable $SERVICES
done
# Show status only
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler ntpd; do
systemctl status $SERVICES | grep 'Active'
done
# Configure etcd
etcdctl mk /coreos.com/network/config '{"Network":"172.17.0.0/16"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment