简单启动一个k8s集群
kube-master
mkdir -p /root/logs/api-audit /root/logs/controller /root/logs/scheduler
kube-apiserver \
--service-cluster-ip-range=10.254.0.0/16 \
--etcd-servers=http://192.168.14.132:2379 \
--insecure-bind-address=0.0.0.0 \
--enable-swagger-ui=true \
--allow-privileged=true \
--audit-log-path=/root/logs/api-audit/apiserver.log \
--audit-log-maxsize=100 \
--audit-log-maxbackup=3 \
--audit-log-maxage=30 \
--event-ttl=1h \
--logtostderr=false \
--log-dir=/root/logs/apiserver \
--v=2 &
kube-controller-manager \
--master=http://127.0.0.1:8080 \
--logtostderr=false \
--log-dir=/root/logs/controller \
--v=2 &
kube-scheduler \
--master=http://127.0.0.1:8080 \
--logtostderr=false \
--log-dir=/root/logs/scheduler \
--v=2 &
pkill kube-apiserver
pkill kube-controller-manager
pkill kube-scheduler
ps -ef|egrep "kube-apiserver|kube-controller-manager|kube-scheduler"
kube-proxy
[root@n1 kubernetes]# kube-proxy
W1122 16:14:22.077173 72745 server.go:190] WARNING: all flags other than --config, --write-config-to, and --cleanup-iptables are deprecated. Please begin using a config file ASAP.
W1122 16:14:22.096868 72745 server.go:388] Neither --kubeconfig nor --master was specified. Using default API client. This might not work.
## 启动proxy
kube-proxy \
--master=http://192.168.14.132:8080
kube-proxy \
--master=http://192.168.14.132:8080
--logtostderr=false \
--log-dir=/root/logs/ \
--v=2
kube-proxy \
--master=http://192.168.14.132:8080
--logtostderr=false \
--log-dir=/root/logs/ \
--v=2