kubernetes

[root@kubernetes1 ~]# yum info kubernetes
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirrors.tds.net
* extras: mirror.eboundhost.com
* updates: repo.us.bigstepcloud.com
Installed Packages
Name : kubernetes
Arch : x86_64
Version : 1.3.0
Release : 0.3.git86dc49a.el7
Size : 0.0
Repo : installed
From repo : extras
Summary : Container cluster management
URL : k8s.io/kubernetes
License : ASL 2.0
Description : Container cluster management

[root@kubernetes1 ~]# yum install docker etcd kubernetes -y

[root@kubernetes1 ~]# for SERVICE in docker etcd kube-apiserver kube-controller-manager kube-scheduler kube-proxy kubelet; do
> systemctl restart $SERVICE
> systemctl enable $SERVICE
> done
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/etcd.service to /usr/lib/systemd/system/etcd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/kube-apiserver.service to /usr/lib/systemd/system/kube-apiserver.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/kube-controller-manager.service to /usr/lib/systemd/system/kube-controller-manager.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/kube-scheduler.service to /usr/lib/systemd/system/kube-scheduler.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/kube-proxy.service to /usr/lib/systemd/system/kube-proxy.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
[root@kubernetes1 ~]#

[root@kubernetes1 ~]# yum install cockpit cockpit-kubernetes -y

[root@kubernetes1 ~]# systemctl enable cockpit.socket
Created symlink from /etc/systemd/system/sockets.target.wants/cockpit.socket to /usr/lib/systemd/system/cockpit.socket.

[root@kubernetes1 ~]# systemctl start cockpit.socket

[root@kubernetes1 ~]# netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:10250 0.0.0.0:* LISTEN 1837/kubelet
tcp 0 0 127.0.0.1:2379 0.0.0.0:* LISTEN 1665/etcd
tcp 0 0 127.0.0.1:2380 0.0.0.0:* LISTEN 1665/etcd
tcp 0 0 127.0.0.1:10255 0.0.0.0:* LISTEN 1837/kubelet
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 1696/kube-apiserver
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 965/sshd
tcp 0 0 127.0.0.1:7001 0.0.0.0:* LISTEN 1665/etcd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1065/master
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 127.0.0.1:10248 0.0.0.0:* LISTEN 1837/kubelet
tcp 0 0 127.0.0.1:10249 0.0.0.0:* LISTEN 1777/kube-proxy
tcp6 0 0 :::10251 :::* LISTEN 1750/kube-scheduler
tcp6 0 0 :::6443 :::* LISTEN 1696/kube-apiserver
tcp6 0 0 :::10252 :::* LISTEN 1723/kube-controlle
tcp6 0 0 :::22 :::* LISTEN 965/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1065/master
tcp6 0 0 :::4194 :::* LISTEN 1837/kubelet

[root@kubernetes1 ~]# firewall-cmd –permanent –zone=public –add-port=9090/tcp && firewall-cmd –reload
success
success

[root@kubernetes1 ~]# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:bd:54:a2:85 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
inet 10.128.0.2 netmask 255.255.255.255 broadcast 10.128.0.2
ether 42:01:0a:80:00:02 txqueuelen 1000 (Ethernet)
RX packets 14883 bytes 100195677 (95.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 11396 bytes 4427282 (4.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 9947 bytes 4198532 (4.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9947 bytes 4198532 (4.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@kubernetes1 ~]# kubectl get nodes
NAME STATUS AGE
127.0.0.1 Ready 9m

[root@kubernetes1 ~]# kubectl –version
Kubernetes v1.3.0

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s