Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
rootsongjc committed May 18, 2017
2 parents 2956efd + 8f65e88 commit 107faf3
Show file tree
Hide file tree
Showing 106 changed files with 6,961 additions and 19 deletions.
16 changes: 16 additions & 0 deletions .gitignore
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
*.pdf
Binary file added CloudNativeLandscape.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 1 addition & 16 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -179,24 +178,10 @@
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
42 changes: 42 additions & 0 deletions Makefile
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"
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,3 @@ pandoc --latex-engine=xelatex --template=pm-template input.md -o output.pdf

[opsnull](http://github.com/opsnull)

[godliness](https://github.com/godliness/)
1 change: 0 additions & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@
- [9.0 Kubernetes领域应用]()
- [10.0 问题记录](issues.md)


42 changes: 42 additions & 0 deletions addons/dashboard.md
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映射。

3 changes: 3 additions & 0 deletions addons/efk.md
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>.
7 changes: 7 additions & 0 deletions addons/heapster.md
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/
```
6 changes: 6 additions & 0 deletions addons/index.md
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)

Loading

0 comments on commit 107faf3

Please sign in to comment.