forked from rootsongjc/kubernetes-handbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
6,961 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Node rules: | ||
## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
## Dependency directory | ||
## Commenting this out is preferred by some people, see | ||
## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git | ||
node_modules | ||
|
||
# Book build output | ||
_book | ||
|
||
# eBook build output | ||
*.epub | ||
*.mobi | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
BOOK_NAME := kubernetes-handbook | ||
BOOK_OUTPUT := _book | ||
|
||
.PHONY: build | ||
build: | ||
gitbook build . $(BOOK_OUTPUT) | ||
|
||
.PHONY: serve | ||
serve: | ||
gitbook serve . $(BOOK_OUTPUT) | ||
|
||
.PHONY: epub | ||
epub: | ||
gitbook epub . $(BOOK_NAME).epub | ||
|
||
.PHONY: pdf | ||
pdf: | ||
gitbook pdf . $(BOOK_NAME).pdf | ||
|
||
.PHONY: mobi | ||
mobi: | ||
gitbook mobi . $(BOOK_NAME).pdf | ||
|
||
.PHONY: install | ||
install: | ||
npm install gitbook-cli -g | ||
gitbook install | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf $(BOOK_OUTPUT) | ||
|
||
.PHONY: help | ||
help: | ||
@echo "Help for make" | ||
@echo "make - Build the book" | ||
@echo "make build - Build the book" | ||
@echo "make serve - Serving the book on localhost:4000" | ||
@echo "make install - Install gitbook and plugins" | ||
@echo "make epub - Build epub book" | ||
@echo "make pdf - Build pdf book" | ||
@echo "make clean - Remove generated files" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,3 @@ | |
- [9.0 Kubernetes领域应用]() | ||
- [10.0 问题记录](issues.md) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Kubernetes Dashboard | ||
|
||
Kubernetes Dashboard的部署非常简单,只需要运行 | ||
|
||
``` | ||
kubectl create -f https://git.io/kube-dashboard | ||
``` | ||
|
||
稍等一会,dashborad就会创建好 | ||
|
||
``` | ||
$ kubectl -n kube-system get service kubernetes-dashboard | ||
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
kubernetes-dashboard 10.101.211.212 <nodes> 80:32729/TCP 1m | ||
$ kubectl -n kube-system describe service kubernetes-dashboard | ||
Name: kubernetes-dashboard | ||
Namespace: kube-system | ||
Labels: app=kubernetes-dashboard | ||
Annotations: <none> | ||
Selector: app=kubernetes-dashboard | ||
Type: NodePort | ||
IP: 10.101.211.212 | ||
Port: <unset> 80/TCP | ||
NodePort: <unset> 32729/TCP | ||
Endpoints: 10.244.1.3:9090 | ||
Session Affinity: None | ||
Events: <none> | ||
``` | ||
|
||
然后就可以通过`http://nodeIP:32729`来访问了。 | ||
|
||
## https | ||
|
||
通常情况下,建议Dashboard服务以https的方式运行,在访问它之前我们需要将证书导入系统中: | ||
|
||
``` | ||
openssl pkcs12 -export -in apiserver-kubelet-client.crt -inkey apiserver-kubelet-client.key -out kube.p12 | ||
curl -sSL -E ./kube.p12:password -k https://nodeIP:6443/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard | ||
``` | ||
|
||
将kube.p12导入系统就可以用浏览器来访问了。注意,如果nodeIP不在证书CN里面,则需要做个hosts映射。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Elasticsearch Fluentd Kibana (EFK) | ||
|
||
配置文件见<https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Heapster | ||
|
||
``` | ||
git clone https://github.com/kubernetes/heapster | ||
cd heapster | ||
kubectl create -f deploy/kube-config/influxdb/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Kubernetes Addons | ||
|
||
- [Dashboard](dashboard.html) | ||
- [Heapster](heapster.html) | ||
- [EFK](efk.html) | ||
|
Oops, something went wrong.