Data desensitization processing

pull/207/head
Jimmy Song 2018-05-04 19:48:54 +08:00
parent 3c32d2f77b
commit 8c3c1ea8e6
98 changed files with 281 additions and 282 deletions

View File

@ -75,7 +75,7 @@ kubelet 的配置文件 `/etc/kubernetes/kubelet` 中的配置中将集群 DNS
```
nameserver 10.0.254.2
search default.svc.cluster.local. svc.cluster.local. cluster.local. tendcloud.com
search default.svc.cluster.local. svc.cluster.local. cluster.local. jimmysong.io
options ndots:5
```
@ -117,7 +117,7 @@ Error: the server does not allow access to the requested resource (get configmap
```bash
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
# helm init -i sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-helm-tiller:v2.3.1
# helm init -i harbor-001.jimmysong.io/library/kubernetes-helm-tiller:v2.3.1
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
```
@ -134,4 +134,4 @@ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"templat
[Resource Design Proposals](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resources.md)
[Helm: Error: no available release name found]()
[Helm: Error: no available release name found]()

View File

@ -226,7 +226,7 @@ spec:
app: test
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/centos:7.2.1511
- image: harbor-001.jimmysong.io/library/centos:7.2.1511
name: test
command: ["/bin/bash","-c","while true; do sleep 1000; done"]
imagePullPolicy: IfNotPresent
@ -237,7 +237,7 @@ spec:
也可以直接使用`kubectl run`的方式来创建:
```bash
kubectl run --image=sz-pg-oam-docker-hub-001.tendcloud.com/library/centos:7.2.1511 --command '/bin/bash -c "while true;do sleep 1000;done"' centos-test
kubectl run --image=harbor-001.jimmysong.io/library/centos:7.2.1511 --command '/bin/bash -c "while true;do sleep 1000;done"' centos-test
```
## 9. 强制删除一直处于Terminating状态的Pod
@ -264,4 +264,4 @@ ETCDCTL_API=3 etcdctl del /registry/pods/default/pod-to-be-deleted-0
这时API server就不会再看到该pod的信息。
如何使用etcdctl查看etcd中包括的kubernetes元数据请参考[使用etcdctl访问kubernetes数据](../guide/using-etcdctl-to-access-kubernetes-data.md)
如何使用etcdctl查看etcd中包括的kubernetes元数据请参考[使用etcdctl访问kubernetes数据](../guide/using-etcdctl-to-access-kubernetes-data.md)

View File

@ -451,9 +451,9 @@ Spark原生支持standalone、mesos和YARN资源调度现已支持Kubernetes
--conf spark.kubernetes.executor.memoryOverhead=2g \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.driver.docker.image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=harbor-001.jimmysong.io/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=harbor-001.jimmysong.io/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.resourceStagingServer.uri=http://172.20.0.114:31000 \
~/Downloads/tendcloud_2.10-1.0.jar
```

View File

@ -50,7 +50,7 @@ spec:
serviceAccountName: istio-manager-service-account
containers:
- name: discovery
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/manager:0.1.5
image: harbor-001.jimmysong.io/library/manager:0.1.5
imagePullPolicy: Always
args: ["discovery", "-v", "2"]
ports:
@ -62,7 +62,7 @@ spec:
apiVersion: v1
fieldPath: metadata.namespace
- name: apiserver
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/manager:0.1.5
image: harbor-001.jimmysong.io/library/manager:0.1.5
imagePullPolicy: Always
args: ["apiserver", "-v", "2"]
ports:
@ -75,4 +75,4 @@ spec:
fieldPath: metadata.namespace
```
`alpha.istio.io/sidecar` 注解就是用来控制是否自动向 pod 中注入 sidecar 的。参考:[安装 Istio sidecar - istio.doczh.cn](http://istio.doczh.cn/docs/setup/kubernetes/sidecar-injection.html)。
`alpha.istio.io/sidecar` 注解就是用来控制是否自动向 pod 中注入 sidecar 的。参考:[安装 Istio sidecar - istio.doczh.cn](http://istio.doczh.cn/docs/setup/kubernetes/sidecar-injection.html)。

View File

@ -259,7 +259,7 @@ spec:
spec:
containers:
- name: my-nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80
envFrom:
@ -317,7 +317,7 @@ spec:
spec:
containers:
- name: my-nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80
volumeMounts:

View File

@ -34,7 +34,7 @@ metadata:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: "*.tendcloud.com"
- host: "*.jimmysong.io"
http:
paths:
- path: /docGenerate
@ -64,4 +64,4 @@ upstream docGenerate {
## 参考
- [Kubernetes Ingress Backend - traefik.io](https://docs.traefik.io/configuration/backends/kubernetes/)
- [Kubernetes Ingress Controller - traefik.io](http://docs.traefik.io/user-guide/kubernetes/)
- [Kubernetes Ingress Controller - traefik.io](http://docs.traefik.io/user-guide/kubernetes/)

View File

@ -145,11 +145,11 @@ Usage of ./update-deployment-image:
**使用不存在的image更新**
```bash
$ ./update-deployment-image -deployment filebeat-test -image sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_9
$ ./update-deployment-image -deployment filebeat-test -image harbor-001.jimmysong.io/library/analytics-docker-test:Build_9
Found deployment
name -> filebeat-test
Old image -> sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
New image -> sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_9
Old image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
New image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_9
```
查看Deployment的event。
@ -200,11 +200,11 @@ filebeat-test-2470325483-gc14k 1/2 ImagePullBackOff 0 4m
将image设置为原来的镜像。
```bash
$ ./update-deployment-image -deployment filebeat-test -image sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
$ ./update-deployment-image -deployment filebeat-test -image harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
Found deployment
name -> filebeat-test
Old image -> sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_9
New image -> sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
Old image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_9
New image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
```
现在再查看Deployment的状态。
@ -243,4 +243,4 @@ Events:
![使用kubernetes dashboard进行故障排查](../images/kubernetes-client-go-sample-update.jpg)
这也是dashboard最大的优势简单、直接、高效。
这也是dashboard最大的优势简单、直接、高效。

View File

@ -121,7 +121,7 @@ spec:
containers:
- name: k8szk
imagePullPolicy: Always
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/zookeeper:3.4.6
image: harbor-001.jimmysong.io/library/zookeeper:3.4.6
resources:
requests:
memory: "2Gi"
@ -293,7 +293,7 @@ spec:
containers:
- name: k8skafka
imagePullPolicy: Always
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kafka:2.10-0.8.2.1
image: harbor-001.jimmysong.io/library/kafka:2.10-0.8.2.1
resources:
requests:
memory: "1Gi"
@ -326,4 +326,4 @@ https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
[kubernetes contrib - statefulsets](https://github.com/kubernetes/contrib/tree/master/statefulsets)
http://blog.kubernetes.io/2017/01/running-mongodb-on-kubernetes-with-statefulsets.html
http://blog.kubernetes.io/2017/01/running-mongodb-on-kubernetes-with-statefulsets.html

View File

@ -22,7 +22,7 @@ spec:
spec:
serviceAccountName: efk
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/elasticsearch:v2.4.1-2
- image: harbor-001.jimmysong.io/library/elasticsearch:v2.4.1-2
name: elasticsearch-logging
resources:
# need more cpu upon initialization, therefore burstable class

View File

@ -24,7 +24,7 @@ spec:
serviceAccountName: efk
containers:
- name: fluentd-es
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/fluentd-elasticsearch:1.22
image: harbor-001.jimmysong.io/library/fluentd-elasticsearch:1.22
command:
- '/bin/sh'
- '-c'

View File

@ -20,7 +20,7 @@ spec:
serviceAccountName: efk
containers:
- name: kibana-logging
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kibana:v4.6.1-1
image: harbor-001.jimmysong.io/library/kibana:v4.6.1-1
resources:
# keep request = limit to keep this container in guaranteed class
limits:

View File

@ -82,7 +82,7 @@ spec:
serviceAccountName: custom-metrics-apiserver
containers:
- name: custom-metrics-server
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-prometheus-adapter
image: harbor-001.jimmysong.io/library/k8s-prometheus-adapter
args:
- --prometheus-url=http://sample-metrics-prom.default.svc:9090
- --metrics-relist-interval=30s

View File

@ -85,8 +85,8 @@ spec:
containers:
- args:
- --kubelet-service=kube-system/kubelet
- --config-reloader-image=sz-pg-oam-docker-hub-001.tendcloud.com/library/configmap-reload:v0.0.1
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus-operator:v0.15.0
- --config-reloader-image=harbor-001.jimmysong.io/library/configmap-reload:v0.0.1
image: harbor-001.jimmysong.io/library/prometheus-operator:v0.15.0
name: prometheus-operator
ports:
- containerPort: 8080

View File

@ -12,7 +12,7 @@ spec:
app: sample-metrics-app
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/autoscale-demo:v0.1.2
- image: harbor-001.jimmysong.io/library/autoscale-demo:v0.1.2
name: sample-metrics-app
ports:
- name: web

View File

@ -42,7 +42,7 @@ metadata:
prometheus: sample-metrics-prom
spec:
replicas: 1
baseImage: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus
baseImage: harbor-001.jimmysong.io/library/prometheus
version: v1.7.1
serviceAccountName: prometheus
serviceMonitorSelector:

View File

@ -1,7 +1,7 @@
## Bitnami MongoDB image version
## ref: https://hub.docker.com/r/bitnami/mongodb/tags/
##
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/bitnami-mongodb:3.4.9-r1
image: harbor-001.jimmysong.io/library/bitnami-mongodb:3.4.9-r1
## Specify a imagePullPolicy
## 'Always' if imageTag is 'latest', else set to 'IfNotPresent'

View File

@ -1,7 +1,7 @@
## Bitnami node image version
## ref: https://hub.docker.com/r/bitnami/node/tags/
##
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/bitnami-node:7.5.0-r0
image: harbor-001.jimmysong.io/library/bitnami-node:7.5.0-r0
## Git repository http/https
##

View File

@ -1,7 +1,7 @@
## Bitnami MongoDB image version
## ref: https://hub.docker.com/r/bitnami/mongodb/tags/
##
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/bitnami-mongodb:3.4.9-r1
image: harbor-001.jimmysong.io/library/bitnami-mongodb:3.4.9-r1
## Specify a imagePullPolicy
## 'Always' if imageTag is 'latest', else set to 'IfNotPresent'

View File

@ -3,7 +3,7 @@
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx
repository: harbor-001.jimmysong.io/library/nginx
tag: 1.9
pullPolicy: IfNotPresent
service:

View File

@ -106,7 +106,7 @@ spec:
containerPort: 8085
- name: admin-http
containerPort: 9995
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "public-api"
@ -120,7 +120,7 @@ spec:
containerPort: 8089
- name: admin-http
containerPort: 9999
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "destination"
@ -132,7 +132,7 @@ spec:
containerPort: 8086
- name: admin-http
containerPort: 9996
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "proxy-api"
@ -146,7 +146,7 @@ spec:
containerPort: 8088
- name: admin-http
containerPort: 9998
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "tap"
@ -158,7 +158,7 @@ spec:
containerPort: 8087
- name: admin-http
containerPort: 9997
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "telemetry"
@ -220,7 +220,7 @@ spec:
containerPort: 8084
- name: admin-http
containerPort: 9994
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-web:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-web:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "-addr=:8084"
@ -287,7 +287,7 @@ spec:
- name: prometheus-config
mountPath: /etc/prometheus
readOnly: true
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus:v1.8.1
image: harbor-001.jimmysong.io/library/prometheus:v1.8.1
imagePullPolicy: IfNotPresent
args:
- "-storage.local.retention=6h"
@ -296,7 +296,7 @@ spec:
# TODO remove/replace?
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.6.2
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.6.2
args: ["proxy", "-p", "8001"]
---

View File

@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: emoji-svc
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/emojivoto-emoji-svc:v1
image: harbor-001.jimmysong.io/library/emojivoto-emoji-svc:v1
env:
- name: GRPC_PORT
value: "8080"
@ -60,7 +60,7 @@ spec:
spec:
containers:
- name: voting-svc
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/emojivoto-voting-svc:v1
image: harbor-001.jimmysong.io/library/emojivoto-voting-svc:v1
env:
- name: GRPC_PORT
value: "8080"
@ -99,7 +99,7 @@ spec:
spec:
containers:
- name: emoji-svc
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/emojivoto-web:v1
image: harbor-001.jimmysong.io/library/emojivoto-web:v1
env:
- name: WEB_PORT
value: "80"

View File

@ -101,13 +101,13 @@ spec:
spec:
initContainers:
- name: kubernetes-dashboard-init
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-dashboard-init-amd64:v1.0.1
image: harbor-001.jimmysong.io/library/kubernetes-dashboard-init-amd64:v1.0.1
volumeMounts:
- name: kubernetes-dashboard-certs
mountPath: /certs
containers:
- name: kubernetes-dashboard
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-dashboard-amd64:v1.7.1
image: harbor-001.jimmysong.io/library/kubernetes-dashboard-amd64:v1.7.1
ports:
- containerPort: 8443
protocol: TCP

View File

@ -21,7 +21,7 @@ spec:
serviceAccountName: dashboard
containers:
- name: kubernetes-dashboard
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-dashboard-amd64:v1.6.3
image: harbor-001.jimmysong.io/library/kubernetes-dashboard-amd64:v1.6.3
resources:
limits:
cpu: 100m

View File

@ -8,7 +8,7 @@
"containers": [
{
"name": "glusterfs",
"image": "sz-pg-oam-docker-hub-001.tendcloud.com/library/pause-amd64:3.0",
"image": "harbor-001.jimmysong.io/library/pause-amd64:3.0",
"volumeMounts": [
{
"mountPath": "/mnt/glusterfs",

View File

@ -11,7 +11,7 @@ spec:
spec:
containers:
- name: nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80

View File

@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: grafana
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/heapster-grafana-amd64:v4.0.2
image: harbor-001.jimmysong.io/library/heapster-grafana-amd64:v4.0.2
ports:
- containerPort: 3000
protocol: TCP

View File

@ -14,8 +14,8 @@ spec:
serviceAccountName: heapster
containers:
- name: heapster
#image: sz-pg-oam-docker-hub-001.tendcloud.com/library/heapster-amd64:v1.3.0-beta.1
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/heapster-amd64:v1.4.3
#image: harbor-001.jimmysong.io/library/heapster-amd64:v1.3.0-beta.1
image: harbor-001.jimmysong.io/library/heapster-amd64:v1.4.3
imagePullPolicy: IfNotPresent
command:
- /heapster

View File

@ -14,7 +14,7 @@ spec:
containers:
- name: influxdb
# image: gcr.io/google_containers/heapster-influxdb-amd64:v1.1.1
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/heapster-influxdb-amd64:v1.1.1
image: harbor-001.jimmysong.io/library/heapster-influxdb-amd64:v1.1.1
volumeMounts:
- mountPath: /data
name: influxdb-storage

View File

@ -42,7 +42,7 @@ spec:
spec:
containers:
- name: details
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-details-v1
image: harbor-001.jimmysong.io/library/examples-bookinfo-details-v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080
@ -77,7 +77,7 @@ spec:
spec:
containers:
- name: ratings
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-ratings-v1
image: harbor-001.jimmysong.io/library/examples-bookinfo-ratings-v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080
@ -112,7 +112,7 @@ spec:
spec:
containers:
- name: reviews
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-reviews-v1
image: harbor-001.jimmysong.io/library/examples-bookinfo-reviews-v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080
@ -131,7 +131,7 @@ spec:
spec:
containers:
- name: reviews
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-reviews-v2
image: harbor-001.jimmysong.io/library/examples-bookinfo-reviews-v2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080
@ -150,7 +150,7 @@ spec:
spec:
containers:
- name: reviews
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-reviews-v3
image: harbor-001.jimmysong.io/library/examples-bookinfo-reviews-v3
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080
@ -185,7 +185,7 @@ spec:
spec:
containers:
- name: productpage
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-productpage-v1
image: harbor-001.jimmysong.io/library/examples-bookinfo-productpage-v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080

View File

@ -26,7 +26,7 @@ spec:
spec:
containers:
- name: grafana
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/grafana:0.1.5
image: harbor-001.jimmysong.io/library/grafana:0.1.5
imagePullPolicy: Always
ports:
- containerPort: 3000

View File

@ -33,7 +33,7 @@ spec:
spec:
containers:
- name: mixer
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/mixer:0.1.5
image: harbor-001.jimmysong.io/library/mixer:0.1.5
imagePullPolicy: Always
ports:
- containerPort: 9091
@ -95,7 +95,7 @@ spec:
serviceAccountName: istio-manager-service-account
containers:
- name: discovery
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/manager:0.1.5
image: harbor-001.jimmysong.io/library/manager:0.1.5
imagePullPolicy: Always
args: ["discovery", "-v", "2"]
ports:
@ -107,7 +107,7 @@ spec:
apiVersion: v1
fieldPath: metadata.namespace
- name: apiserver
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/manager:0.1.5
image: harbor-001.jimmysong.io/library/manager:0.1.5
imagePullPolicy: Always
args: ["apiserver", "-v", "2"]
ports:
@ -159,7 +159,7 @@ spec:
serviceAccountName: istio-ingress-service-account
containers:
- name: istio-ingress
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/proxy_debug:0.1.5
image: harbor-001.jimmysong.io/library/proxy_debug:0.1.5
args: ["proxy", "ingress", "-v", "2"]
imagePullPolicy: Always
ports:
@ -199,7 +199,7 @@ spec:
spec:
containers:
- name: proxy
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/proxy_debug:0.1.5
image: harbor-001.jimmysong.io/library/proxy_debug:0.1.5
imagePullPolicy: Always
args: ["proxy", "egress", "-v", "2"]
env:

View File

@ -37,7 +37,7 @@
"spec": {
"containers": [
{
"image": "sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-productpage-v1",
"image": "harbor-001.jimmysong.io/library/examples-bookinfo-productpage-v1",
"imagePullPolicy": "IfNotPresent",
"name": "productpage",
"ports": [
@ -208,8 +208,8 @@
"containerStatuses": [
{
"containerID": "docker://686c609d0343b73f2e9fac39f6439203de776810c409546571f411301db2f164",
"image": "sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-productpage-v1:latest",
"imageID": "docker-pullable://sz-pg-oam-docker-hub-001.tendcloud.com/library/examples-bookinfo-productpage-v1@sha256:fceb387d10815a5be86322335e07358ce5398c686947e510c2454cfbb98c4c46",
"image": "harbor-001.jimmysong.io/library/examples-bookinfo-productpage-v1:latest",
"imageID": "docker-pullable://harbor-001.jimmysong.io/library/examples-bookinfo-productpage-v1@sha256:fceb387d10815a5be86322335e07358ce5398c686947e510c2454cfbb98c4c46",
"lastState": {},
"name": "productpage",
"ready": true,

View File

@ -52,7 +52,7 @@ spec:
spec:
containers:
- name: prometheus
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus:v1.1.1
image: harbor-001.jimmysong.io/library/prometheus:v1.1.1
args:
- '-storage.local.retention=6h'
- '-storage.local.memory-chunks=500000'

View File

@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: servicegraph
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/servicegraph:latest
image: harbor-001.jimmysong.io/library/servicegraph:latest
ports:
- containerPort: 8088
args:

View File

@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: zipkin
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/zipkin:latest
image: harbor-001.jimmysong.io/library/zipkin:latest
ports:
- containerPort: 9411
env:

View File

@ -1,4 +1,4 @@
FROM sz-pg-oam-docker-hub-001.tendcloud.com/library/jdk:8u45
FROM harbor-001.jimmysong.io/library/jdk:8u45
ENV KAFKA_USER=kafka \
KAFKA_DATA_DIR=/var/lib/kafka/data \
JAVA_HOME=/usr/local/java \
@ -8,7 +8,7 @@ PATH=$PATH:/opt/kafka/bin
ARG KAFKA_DIST=kafka_2.10-0.8.2.1
RUN set -x \
&& yum install -y wget tar \
&& wget -q "http://repo.tendcloud.com/td-configuration/deploy/kafka/$KAFKA_DIST.tgz" \
&& wget -q "http://repo.jimmysong.io/configuration/deploy/kafka/$KAFKA_DIST.tgz" \
&& export GNUPGHOME="$(mktemp -d)" \
&& tar -xzf "$KAFKA_DIST.tgz" -C /opt \
&& rm -r "$GNUPGHOME" "$KAFKA_DIST.tgz"

View File

@ -60,7 +60,7 @@ spec:
containers:
- name: k8skafka
imagePullPolicy: Always
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kafka:2.10-0.8.2.1
image: harbor-001.jimmysong.io/library/kafka:2.10-0.8.2.1
resources:
requests:
memory: "1Gi"

View File

@ -55,7 +55,7 @@ spec:
optional: true
containers:
- name: kubedns
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-kube-dns-amd64:1.14.1
image: harbor-001.jimmysong.io/library/k8s-dns-kube-dns-amd64:1.14.1
resources:
# TODO: Set memory limits when we've profiled the container for large
# clusters, then set request = limit to keep this container in
@ -107,7 +107,7 @@ spec:
- name: kube-dns-config
mountPath: /kube-dns-config
- name: dnsmasq
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-dnsmasq-nanny-amd64:1.14.1
image: harbor-001.jimmysong.io/library/k8s-dns-dnsmasq-nanny-amd64:1.14.1
livenessProbe:
httpGet:
path: /healthcheck/dnsmasq
@ -145,7 +145,7 @@ spec:
- name: kube-dns-config
mountPath: /etc/k8s/dns/dnsmasq-nanny
- name: sidecar
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-sidecar-amd64:1.14.1
image: harbor-001.jimmysong.io/library/k8s-dns-sidecar-amd64:1.14.1
livenessProbe:
httpGet:
path: /metrics

View File

@ -15,7 +15,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-helloworld:0.1.4
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
env:
- name: NODE_NAME
valueFrom:
@ -36,7 +36,7 @@ spec:
- name: service
containerPort: 7779
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- proxy
- "-p"

View File

@ -15,7 +15,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-helloworld:0.1.4
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
env:
- name: NODE_NAME
valueFrom:
@ -61,7 +61,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-helloworld:0.1.4
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
env:
- name: POD_IP
valueFrom:

View File

@ -15,7 +15,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-helloworld:0.1.4
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
env:
- name: NODE_NAME
valueFrom:
@ -64,7 +64,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-helloworld:0.1.4
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
env:
- name: POD_IP
valueFrom:

View File

@ -15,7 +15,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-helloworld:0.1.4
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
env:
- name: NODE_NAME
valueFrom:
@ -62,7 +62,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-helloworld:0.1.4
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
env:
- name: POD_IP
valueFrom:

View File

@ -15,7 +15,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: jenkins
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-jenkins-plus:2.60.1
image: harbor-001.jimmysong.io/library/buoyantio-jenkins-plus:2.60.1
ports:
- name: http
containerPort: 8080

View File

@ -83,7 +83,7 @@ spec:
name: "l5d-config"
containers:
- name: l5d
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-linkerd:1.1.2
image: harbor-001.jimmysong.io/library/buoyantio-linkerd:1.1.2
env:
- name: POD_IP
valueFrom:
@ -105,7 +105,7 @@ spec:
readOnly: true
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- "proxy"
- "-p"

View File

@ -39,7 +39,7 @@ spec:
name: "l5d-config"
containers:
- name: l5d
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-linkerd:1.1.2
image: harbor-001.jimmysong.io/library/buoyantio-linkerd:1.1.2
env:
- name: POD_IP
valueFrom:
@ -59,7 +59,7 @@ spec:
readOnly: true
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args: ["proxy", "-p", "8001"]
---
apiVersion: v1

View File

@ -100,7 +100,7 @@ spec:
name: "l5d-config"
containers:
- name: l5d
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-linkerd:1.1.2
image: harbor-001.jimmysong.io/library/buoyantio-linkerd:1.1.2
env:
- name: POD_IP
valueFrom:
@ -125,7 +125,7 @@ spec:
readOnly: true
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- "proxy"
- "-p"

View File

@ -77,7 +77,7 @@ spec:
name: "l5d-config"
containers:
- name: l5d
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-linkerd:1.1.2
image: harbor-001.jimmysong.io/library/buoyantio-linkerd:1.1.2
env:
- name: POD_IP
valueFrom:
@ -101,7 +101,7 @@ spec:
readOnly: true
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- "proxy"
- "-p"

View File

@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: linkerd-viz
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-linkerd-viz:latest
image: harbor-001.jimmysong.io/library/buoyantio-linkerd-viz:latest
args: ["k8s"]
imagePullPolicy: Always
env:
@ -33,7 +33,7 @@ spec:
containerPort: 9191
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- "proxy"
- "-p"

View File

@ -82,7 +82,7 @@ spec:
name: "l5d-config"
containers:
- name: l5d
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-linkerd:1.1.2
image: harbor-001.jimmysong.io/library/buoyantio-linkerd:1.1.2
env:
- name: POD_IP
valueFrom:
@ -105,7 +105,7 @@ spec:
readOnly: true
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- "proxy"
- "-p"

View File

@ -78,7 +78,7 @@ spec:
name: "l5d-config"
containers:
- name: l5d
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-linkerd:1.1.2
image: harbor-001.jimmysong.io/library/buoyantio-linkerd:1.1.2
env:
- name: POD_IP
valueFrom:
@ -100,7 +100,7 @@ spec:
readOnly: true
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- "proxy"
- "-p"

View File

@ -56,7 +56,7 @@ spec:
name: namerd-config
containers:
- name: namerd
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-namerd:1.1.2
image: harbor-001.jimmysong.io/library/buoyantio-namerd:1.1.2
args:
- /io.buoyant/namerd/config/config.yml
ports:
@ -71,7 +71,7 @@ spec:
mountPath: "/io.buoyant/namerd/config"
readOnly: true
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- "proxy"
- "-p"
@ -139,7 +139,7 @@ spec:
defaultMode: 0755
containers:
- name: namerctl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/linkerd-namerctl:0.8.6
image: harbor-001.jimmysong.io/library/linkerd-namerctl:0.8.6
env:
- name: NAMERCTL_BASE_URL
value: http://namerd.default.svc.cluster.local:4180

View File

@ -88,7 +88,7 @@ spec:
name: nginx-config
containers:
- name: nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-nginx:1.10.2
image: harbor-001.jimmysong.io/library/buoyantio-nginx:1.10.2
ports:
- containerPort: 80
volumeMounts:

View File

@ -295,7 +295,7 @@ spec:
name: "l5d-config"
containers:
- name: l5d
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-linkerd:1.1.2
image: harbor-001.jimmysong.io/library/buoyantio-linkerd:1.1.2
env:
- name: POD_IP
valueFrom:
@ -335,7 +335,7 @@ spec:
# Run `kubectl proxy` as a sidecar to give us authenticated access to the
# Kubernetes API.
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.4.0
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
args:
- "proxy"
- "-p"

View File

@ -15,7 +15,7 @@ spec:
dnsPolicy: ClusterFirst
containers:
- name: service
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-helloworld:0.1.4
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
env:
- name: POD_IP
valueFrom:

View File

@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: zipkin
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/openzipkin-zipkin:1.20
image: harbor-001.jimmysong.io/library/openzipkin-zipkin:1.20
env:
- name: SCRIBE_ENABLED
value: "true"

View File

@ -33,7 +33,7 @@ spec:
pod.beta.kubernetes.io/init-containers: '[
{
"name": "galera-init",
"image": "bj-xg-oam-docker-hub-001.tendcloud.com/library/k8s-galera-init:latest",
"image": "harbor-001.jimmysong.io/library/k8s-galera-init:latest",
"args": ["-service=mysql"],
"env": [
{
@ -67,7 +67,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: mysql
image: bj-xg-oam-docker-hub-001.tendcloud.com/library/mariadb:10.1
image: harbor-001.jimmysong.io/library/mariadb:10.1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3306

View File

@ -4,7 +4,7 @@
controller:
name: controller
image:
repository: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx-ingress-controller
repository: harbor-001.jimmysong.io/library/nginx-ingress-controller
tag: "0.9.0-beta.15"
pullPolicy: IfNotPresent
@ -146,7 +146,7 @@ defaultBackend:
name: default-backend
image:
repository: sz-pg-oam-docker-hub-001.tendcloud.com/library/defaultbackend
repository: harbor-001.jimmysong.io/library/defaultbackend
tag: "1.3"
pullPolicy: IfNotPresent
@ -209,7 +209,7 @@ rbac:
statsExporter:
name: stats-exporter
image:
repository: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx-vts-exporter
repository: harbor-001.jimmysong.io/library/nginx-vts-exporter
tag: v0.6
pullPolicy: IfNotPresent

View File

@ -27,7 +27,7 @@ spec:
containers:
- name: jenkins
imagePullPolicy: IfNotPresent
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/jenkins:lts
image: harbor-001.jimmysong.io/library/jenkins:lts
ports:
- containerPort: 8080
volumeMounts:

View File

@ -70,16 +70,16 @@ spec:
containers:
- name: maya-apiserver
imagePullPolicy: Always
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/openebs-m-apiserver:0.5.1-RC1
image: harbor-001.jimmysong.io/library/openebs-m-apiserver:0.5.1-RC1
ports:
- containerPort: 5656
env:
- name: OPENEBS_IO_JIVA_CONTROLLER_IMAGE
value: "sz-pg-oam-docker-hub-001.tendcloud.com/library/openebs-jiva:0.5.1-RC1"
value: "harbor-001.jimmysong.io/library/openebs-jiva:0.5.1-RC1"
- name: OPENEBS_IO_JIVA_REPLICA_IMAGE
value: "sz-pg-oam-docker-hub-001.tendcloud.com/library/openebs-jiva:0.5.1-RC1"
value: "harbor-001.jimmysong.io/library/openebs-jiva:0.5.1-RC1"
- name: OPENEBS_IO_VOLUME_MONITOR_IMAGE
value: "sz-pg-oam-docker-hub-001.tendcloud.com/library/openebs-m-exporter:0.5.0"
value: "harbor-001.jimmysong.io/library/openebs-m-exporter:0.5.0"
- name: OPENEBS_IO_JIVA_REPLICA_COUNT
value: "2"
---
@ -113,7 +113,7 @@ spec:
containers:
- name: openebs-provisioner
imagePullPolicy: Always
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/openebs-k8s-provisioner:0.5.1-RC2
image: harbor-001.jimmysong.io/library/openebs-k8s-provisioner:0.5.1-RC2
env:
- name: NODE_NAME
valueFrom:

View File

@ -12,7 +12,7 @@ spec:
spec:
initContainers:
- name: install
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/redis-install-3.2.0:e2e
image: harbor-001.jimmysong.io/library/redis-install-3.2.0:e2e
imagePullPolicy: Always
args:
- "--install-into=/opt"
@ -23,7 +23,7 @@ spec:
- name: workdir
mountPath: "/work-dir"
- name: bootstrap
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/debian:jessie
image: harbor-001.jimmysong.io/library/debian:jessie
command:
- "/work-dir/peer-finder"
args:
@ -42,7 +42,7 @@ spec:
mountPath: "/work-dir"
containers:
- name: redis
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/debian:jessie
image: harbor-001.jimmysong.io/library/debian:jessie
ports:
- containerPort: 6379
name: peer

View File

@ -33,7 +33,7 @@ spec:
serviceAccountName: faas-controller
containers:
- name: faas-netesd
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/faas-netesd:0.3.4
image: harbor-001.jimmysong.io/library/faas-netesd:0.3.4
ports:
- containerPort: 8080
protocol: TCP
@ -72,7 +72,7 @@ spec:
spec:
containers:
- name: gateway
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/gateway:0.6.14
image: harbor-001.jimmysong.io/library/gateway:0.6.14
env:
- name: functions_provider_url
value: "http://faas-netesd.default.svc.cluster.local:8080/"

View File

@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: prometheus
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus:latest-k8s
image: harbor-001.jimmysong.io/library/prometheus:latest-k8s
command: ["prometheus","-config.file=/etc/prometheus/prometheus.yml", "-storage.local.path=/prometheus", "-storage.local.memory-chunks=10000", "--alertmanager.url=http://alertmanager.default:9093"]
ports:
- containerPort: 9090
@ -68,7 +68,7 @@ spec:
spec:
containers:
- name: alertmanager
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/alertmanager:latest-k8s
image: harbor-001.jimmysong.io/library/alertmanager:latest-k8s
command: ["/bin/alertmanager","-config.file=/alertmanager.yml", "-storage.path=/alertmanager"]
ports:
- containerPort: 9003

View File

@ -14,6 +14,6 @@ spec:
spec:
serviceAccountName: prometheus-k8s
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/centos:7.2.1511
- image: harbor-001.jimmysong.io/library/centos:7.2.1511
name: test
imagePullPolicy: IfNotPresent

View File

@ -305,7 +305,7 @@ spec:
spec:
containers:
- name: alertmanager
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus-alertmanager:v0.7.1
image: harbor-001.jimmysong.io/library/prometheus-alertmanager:v0.7.1
args:
- '-config.file=/etc/alertmanager/config.yml'
- '-storage.path=/alertmanager'
@ -366,7 +366,7 @@ spec:
component: core
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/grafana:4.2.0
- image: harbor-001.jimmysong.io/library/grafana:4.2.0
name: grafana-core
imagePullPolicy: IfNotPresent
# env:
@ -421,7 +421,7 @@ spec:
pod.beta.kubernetes.io/init-containers: '[
{
"name": "wait-for-endpoints",
"image": "sz-pg-oam-docker-hub-001.tendcloud.com/library/centos:7.2.1511
"image": "harbor-001.jimmysong.io/library/centos:7.2.1511
"imagePullPolicy": "IfNotPresent",
"command": ["bash", "-c", "echo \"waiting for endpoints...\"; while true; set endpoints (curl -sX GET -H \"Authorization:bearer `cat /var/run/secrets/kubernetes.io/serviceaccount/token`\" -k https://kubernetes.default/api/v1/namespaces/monitoring/endpoints/grafana); echo $endpoints | jq \".\"; if test (echo $endpoints | jq -r \".subsets[]?.addresses // [] | length\") -gt 0; exit 0; end; echo \"waiting...\";sleep 1; end"],
"args": ["monitoring", "grafana"]
@ -431,7 +431,7 @@ spec:
serviceAccountName: prometheus-k8s
containers:
- name: grafana-import-dashboards
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/centos:7.2.1511
image: harbor-001.jimmysong.io/library/centos:7.2.1511
command: ["/bin/sh", "-c"]
workingDir: /opt/grafana-import-dashboards
args:
@ -673,7 +673,7 @@ spec:
serviceAccountName: prometheus-k8s
containers:
- name: prometheus
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prom-prometheus:v1.7.0
image: harbor-001.jimmysong.io/library/prom-prometheus:v1.7.0
args:
- '-storage.local.retention=12h'
- '-storage.local.memory-chunks=500000'
@ -717,7 +717,7 @@ spec:
serviceAccountName: kube-state-metrics
containers:
- name: kube-state-metrics
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kube-state-metrics:v1.0.1
image: harbor-001.jimmysong.io/library/kube-state-metrics:v1.0.1
ports:
- containerPort: 8080
---
@ -804,7 +804,7 @@ spec:
spec:
containers:
- name: read-du
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/giantswarm-tiny-tools
image: harbor-001.jimmysong.io/library/giantswarm-tiny-tools
imagePullPolicy: Always
# FIXME threshold via env var
# The
@ -829,7 +829,7 @@ spec:
- name: metrics
mountPath: /tmp
- name: caddy
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/dockermuenster-caddy:0.9.3
image: harbor-001.jimmysong.io/library/dockermuenster-caddy:0.9.3
command:
- "caddy"
- "-port=9102"
@ -864,7 +864,7 @@ spec:
component: node-exporter
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prom-node-exporter:v0.14.0
- image: harbor-001.jimmysong.io/library/prom-node-exporter:v0.14.0
name: prometheus-node-exporter
ports:
- name: prom-node-exp

View File

@ -1,5 +1,5 @@
#!/bin/bash
repo=sz-pg-oam-docker-hub-001.tendcloud.com/library/
repo=harbor-001.jimmysong.io/library/
cat $1|while read line
do
docker pull $line

View File

@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: spark-master
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark:1.5.2_v1
image: harbor-001.jimmysong.io/library/spark:1.5.2_v1
command: ["/start-master"]
ports:
- containerPort: 7077

View File

@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: spark-ui-proxy
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-ui-proxy:1.0
image: harbor-001.jimmysong.io/library/spark-ui-proxy:1.0
ports:
- containerPort: 80
resources:

View File

@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: spark-worker
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark:1.5.2_v1
image: harbor-001.jimmysong.io/library/spark:1.5.2_v1
command: ["/start-worker"]
ports:
- containerPort: 8081

View File

@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: zeppelin
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/zeppelin:0.7.1
image: harbor-001.jimmysong.io/library/zeppelin:0.7.1
ports:
- containerPort: 8080
resources:

View File

@ -33,7 +33,7 @@ spec:
name: spark-resource-staging-server-config
containers:
- name: spark-resource-staging-server
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-resource-staging-server:v2.1.0-kubernetes-0.3.1-1
image: harbor-001.jimmysong.io/library/spark-resource-staging-server:v2.1.0-kubernetes-0.3.1-1
resources:
requests:
cpu: 100m

View File

@ -12,7 +12,7 @@ spec:
app: test
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/centos:7.2.1511
- image: harbor-001.jimmysong.io/library/centos:7.2.1511
name: test
command: ["/bin/bash","-c","while true; do sleep 1000; done"]
imagePullPolicy: IfNotPresent

View File

@ -11,7 +11,7 @@ spec:
spec:
containers:
- name: my-nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80
volumeMounts:

View File

@ -11,14 +11,14 @@ spec:
k8s-app: filebeat-test
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/filebeat:5.4.0
- image: harbor-001.jimmysong.io/library/filebeat:5.4.0
name: filebeat
volumeMounts:
- name: app-logs
mountPath: /log
- name: filebeat-config
mountPath: /etc/filebeat/
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
- image: harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
name : app
ports:
- containerPort: 80

View File

@ -11,7 +11,7 @@ spec:
k8s-app: logstash-test
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/logstash:5.3.0
- image: harbor-001.jimmysong.io/library/logstash:5.3.0
name: logstash
resources:
requests:
@ -29,7 +29,7 @@ spec:
value: logstash-docker
- name: CODEC
value: plain
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
- image: harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
name : app
ports:
- containerPort: 80

View File

@ -11,7 +11,7 @@ spec:
spec:
containers:
- name: my-nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80
---

View File

@ -5,6 +5,6 @@ metadata:
spec:
containers:
- name: nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80

View File

@ -6,11 +6,11 @@ TAG = v2
# Build for linux amd64
build:
GOOS=linux GOARCH=amd64 go build -o hello${TAG} main.go
docker build -t sz-pg-oam-docker-hub-001.tendcloud.com/library/hello:${TAG} .
docker build -t harbor-001.jimmysong.io/library/hello:${TAG} .
# Push to tenxcloud
push:
docker push sz-pg-oam-docker-hub-001.tendcloud.com/library/hello:${TAG}
docker push harbor-001.jimmysong.io/library/hello:${TAG}
# Clean
clean:

View File

@ -11,7 +11,7 @@ spec:
spec:
containers:
- name: rolling-update-test
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/hello:v1
image: harbor-001.jimmysong.io/library/hello:v1
ports:
- containerPort: 9090
---

View File

@ -1,4 +1,4 @@
FROM sz-pg-oam-docker-hub-001.tendcloud.com/library/jdk:7u80
FROM harbor-001.jimmysong.io/library/jdk:7u80
ENV ZK_USER=zookeeper \
ZK_DATA_DIR=/var/lib/zookeeper/data \
@ -10,7 +10,7 @@ ARG ZK_DIST=zookeeper-3.4.6
RUN set -x \
&& yum install -y wget nc \
&& wget -q "http://repo.tendcloud.com/td-configuration/deploy/zookeeper/$ZK_DIST.tar.gz" \
&& wget -q "http://repo.jimmysong.io/configuration/deploy/zookeeper/$ZK_DIST.tar.gz" \
&& export GNUPGHOME="$(mktemp -d)" \
&& tar -xzf "$ZK_DIST.tar.gz" -C /opt \
&& rm -r "$GNUPGHOME" "$ZK_DIST.tar.gz" \

View File

@ -63,7 +63,7 @@ spec:
containers:
- name: k8szk
imagePullPolicy: Always
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/zookeeper:3.4.6
image: harbor-001.jimmysong.io/library/zookeeper:3.4.6
resources:
requests:
memory: "2Gi"

View File

@ -53,14 +53,14 @@ spec:
k8s-app: filebeat-test
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/filebeat:5.4.0
- image: harbor-001.jimmysong.io/library/filebeat:5.4.0
name: filebeat
volumeMounts:
- name: app-logs
mountPath: /log
- name: filebeat-config
mountPath: /etc/filebeat/
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
- image: harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
name : app
ports:
- containerPort: 80
@ -116,7 +116,7 @@ data:
```yaml
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/filebeat:5.4.0
- image: harbor-001.jimmysong.io/library/filebeat:5.4.0
name: filebeat
volumeMounts:
- name: app-logs

View File

@ -63,7 +63,7 @@ $ diff dashboard-controller.yaml.orig dashboard-controller.yaml
23c23
< image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.0
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-dashboard-amd64:v1.6.0
> image: harbor-001.jimmysong.io/library/kubernetes-dashboard-amd64:v1.6.0
```
## 执行所有定义文件
@ -158,7 +158,7 @@ Kubernetes 1.6 版本的 dashboard 的镜像已经到了 v1.6.3 版本,我们
修改 `dashboard-controller.yaml` 文件中的镜像的版本将 `v1.6.0` 更改为 `v1.6.3`
```yaml
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-dashboard-amd64:v1.6.3
image: harbor-001.jimmysong.io/library/kubernetes-dashboard-amd64:v1.6.3
```
然后执行下面的命令:
@ -197,4 +197,4 @@ Dashboard 的访问地址不变,重新访问 <http://172.20.0.113:8080/api/v1/
## 参考
[WebUI(Dashboard) 文档](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/)
[WebUI(Dashboard) 文档](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/)

View File

@ -21,7 +21,7 @@ $ diff es-controller.yaml.orig es-controller.yaml
24c24
< - image: gcr.io/google_containers/elasticsearch:v2.4.1-2
---
> - image: sz-pg-oam-docker-hub-001.tendcloud.com/library/elasticsearch:v2.4.1-2
> - image: harbor-001.jimmysong.io/library/elasticsearch:v2.4.1-2
```
## 配置 es-service.yaml
@ -35,7 +35,7 @@ $ diff fluentd-es-ds.yaml.orig fluentd-es-ds.yaml
26c26
< image: gcr.io/google_containers/fluentd-elasticsearch:1.22
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/fluentd-elasticsearch:1.22
> image: harbor-001.jimmysong.io/library/fluentd-elasticsearch:1.22
```
## 配置 kibana-controller.yaml
@ -45,7 +45,7 @@ $ diff kibana-controller.yaml.orig kibana-controller.yaml
22c22
< image: gcr.io/google_containers/kibana:v4.6.1-1
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kibana:v4.6.1-1
> image: harbor-001.jimmysong.io/library/kibana:v4.6.1-1
```
## 给 Node 设置标签
@ -158,4 +158,4 @@ server.basePath: /api/v1/proxy/namespaces/kube-system/services/kibana-logging
创建Index后可以在 `Discover` 下看到 ElasticSearch logging 中汇聚的日志;
![es-home](../images/kubernetes-efk-kibana.jpg)
![es-home](../images/kubernetes-efk-kibana.jpg)

View File

@ -1,10 +1,10 @@
# 创建高可用 etcd 集群
kuberntes 系统使用 etcd 存储所有数据,本文档介绍部署一个三节点高可用 etcd 集群的步骤,这三个节点复用 kubernetes master 机器,分别命名为`sz-pg-oam-docker-test-001.tendcloud.com`、`sz-pg-oam-docker-test-002.tendcloud.com`、`sz-pg-oam-docker-test-003.tendcloud.com`
kuberntes 系统使用 etcd 存储所有数据,本文档介绍部署一个三节点高可用 etcd 集群的步骤,这三个节点复用 kubernetes master 机器,分别命名为`test-001.jimmysong.io`、`test-002.jimmysong.io`、`test-003.jimmysong.io`
+ sz-pg-oam-docker-test-001.tendcloud.com172.20.0.113
+ sz-pg-oam-docker-test-002.tendcloud.com172.20.0.114
+ sz-pg-oam-docker-test-003.tendcloud.com172.20.0.115
+ test-001.jimmysong.io172.20.0.113
+ test-002.jimmysong.io172.20.0.114
+ test-003.jimmysong.io172.20.0.115
## TLS 认证文件

View File

@ -38,7 +38,7 @@ $ diff grafana-deployment.yaml.orig grafana-deployment.yaml
16c16
< image: gcr.io/google_containers/heapster-grafana-amd64:v4.0.2
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/heapster-grafana-amd64:v4.0.2
> image: harbor-001.jimmysong.io/library/heapster-grafana-amd64:v4.0.2
40,41c40,41
< # value: /api/v1/proxy/namespaces/kube-system/services/monitoring-grafana/
< value: /
@ -57,7 +57,7 @@ $ diff heapster-deployment.yaml.orig heapster-deployment.yaml
16c16
< image: gcr.io/google_containers/heapster-amd64:v1.3.0-beta.1
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/heapster-amd64:v1.3.0-beta.1
> image: harbor-001.jimmysong.io/library/heapster-amd64:v1.3.0-beta.1
```
## 配置 influxdb-deployment
@ -87,7 +87,7 @@ $ diff influxdb-deployment.yaml.orig influxdb-deployment.yaml
16c16
< image: gcr.io/google_containers/heapster-influxdb-amd64:v1.1.1
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/heapster-influxdb-amd64:v1.1.1
> image: harbor-001.jimmysong.io/library/heapster-influxdb-amd64:v1.1.1
19a20,21
> - mountPath: /etc/
> name: influxdb-config
@ -215,4 +215,4 @@ monitoring-influxdb 10.254.22.46 <nodes> 8086:32299/TCP,8083:30269/T
## 参考
[使用Heapster获取集群对象的metric数据](../practice/using-heapster-to-get-object-metrics.md)
[使用Heapster获取集群对象的metric数据](../practice/using-heapster-to-get-object-metrics.md)

View File

@ -154,7 +154,7 @@ resources:
以上两个变量值是在create chart的时候自动生成的默认值。
我们将默认的镜像地址和tag改成我们自己的镜像`sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9`。
我们将默认的镜像地址和tag改成我们自己的镜像`harbor-001.jimmysong.io/library/nginx:1.9`。
### 检查配置和模板是否有效
@ -177,7 +177,7 @@ USER-SUPPLIED VALUES:
COMPUTED VALUES:
image:
pullPolicy: IfNotPresent
repository: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx
repository: harbor-001.jimmysong.io/library/nginx
tag: 1.9
replicaCount: 1
resources:
@ -231,7 +231,7 @@ spec:
spec:
containers:
- name: mychart
image: "sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9"
image: "harbor-001.jimmysong.io/library/nginx:1.9"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
@ -471,7 +471,7 @@ Downloading mongodb from repo https://kubernetes-charts.storage.googleapis.com/
将刚才下载的`charts/mongodb-0.4.17.tgz`给解压后,修改其中的配置:
- 将`persistence`下的`enabled`设置为false
- 将image修改为我们的私有镜像sz-pg-oam-docker-hub-001.tendcloud.com/library/bitnami-mongodb:3.4.9-r1
- 将image修改为我们的私有镜像harbor-001.jimmysong.io/library/bitnami-mongodb:3.4.9-r1
执行`helm install --dry-run --debug .`确定模板无误。

View File

@ -10,9 +10,9 @@
我clone了上述镜像上传到我的私有镜像仓库
```
sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-dnsmasq-nanny-amd64:1.14.1
sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-kube-dns-amd64:1.14.1
sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-sidecar-amd64:1.14.1
harbor-001.jimmysong.io/library/k8s-dns-dnsmasq-nanny-amd64:1.14.1
harbor-001.jimmysong.io/library/k8s-dns-kube-dns-amd64:1.14.1
harbor-001.jimmysong.io/library/k8s-dns-sidecar-amd64:1.14.1
```
同时上传了一份到时速云备份:
@ -87,7 +87,7 @@ $ diff kubedns-controller.yaml.base kubedns-controller.yaml
58c58
< image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.1
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-kube-dns-amd64:v1.14.1
> image: harbor-001.jimmysong.io/library/k8s-dns-kube-dns-amd64:v1.14.1
88c88
< - --domain=__PILLAR__DNS__DOMAIN__.
---
@ -99,7 +99,7 @@ $ diff kubedns-controller.yaml.base kubedns-controller.yaml
110c110
< image: gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.1
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-dnsmasq-nanny-amd64:v1.14.1
> image: harbor-001.jimmysong.io/library/k8s-dns-dnsmasq-nanny-amd64:v1.14.1
129c129
< - --server=/__PILLAR__DNS__DOMAIN__/127.0.0.1#10053
---
@ -107,7 +107,7 @@ $ diff kubedns-controller.yaml.base kubedns-controller.yaml
148c148
< image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.1
---
> image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-dns-sidecar-amd64:v1.14.1
> image: harbor-001.jimmysong.io/library/k8s-dns-sidecar-amd64:v1.14.1
161,162c161,162
< - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.__PILLAR__DNS__DOMAIN__,5,A
< - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.__PILLAR__DNS__DOMAIN__,5,A
@ -147,7 +147,7 @@ spec:
spec:
containers:
- name: my-nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80
$ kubectl create -f my-nginx.yaml
@ -168,7 +168,7 @@ $ kubectl create -f nginx-pod.yaml
$ kubectl exec nginx -i -t -- /bin/bash
root@nginx:/# cat /etc/resolv.conf
nameserver 10.254.0.2
search default.svc.cluster.local. svc.cluster.local. cluster.local. tendcloud.com
search default.svc.cluster.local. svc.cluster.local. cluster.local. jimmysong.io
options ndots:5
root@nginx:/# ping my-nginx
@ -188,4 +188,4 @@ PING kube-dns.kube-system.svc.cluster.local (10.254.0.2): 56 data bytes
```
从结果来看service名称可以正常解析。
**注意**直接ping ClusterIP是ping不通的ClusterIP是根据**IPtables**路由到服务的endpoint上只有结合ClusterIP加端口才能访问到对应的服务。
**注意**直接ping ClusterIP是ping不通的ClusterIP是根据**IPtables**路由到服务的endpoint上只有结合ClusterIP加端口才能访问到对应的服务。

View File

@ -117,7 +117,7 @@ KUBE_LOG_LEVEL="--v=0"
KUBE_ALLOW_PRIV="--allow-privileged=true"
# How the controller-manager, scheduler, and proxy find the apiserver
#KUBE_MASTER="--master=http://sz-pg-oam-docker-test-001.tendcloud.com:8080"
#KUBE_MASTER="--master=http://test-001.jimmysong.io:8080"
KUBE_MASTER="--master=http://172.20.0.113:8080"
```
@ -133,7 +133,7 @@ apiserver配置文件`/etc/kubernetes/apiserver`内容为:
##
#
## The address on the local server to listen to.
#KUBE_API_ADDRESS="--insecure-bind-address=sz-pg-oam-docker-test-001.tendcloud.com"
#KUBE_API_ADDRESS="--insecure-bind-address=test-001.jimmysong.io"
KUBE_API_ADDRESS="--advertise-address=172.20.0.113 --bind-address=172.20.0.113 --insecure-bind-address=172.20.0.113"
#
## The port on the local server to listen on.

View File

@ -134,7 +134,7 @@ spec:
spec:
containers:
- name: php-redis
image: bj-xg-oam-docker-hub-001.tendcloud.com/library/gb-frontend:v4
image: harbor-001.jimmysong.io/library/gb-frontend:v4
resources:
requests:
cpu: 100m
@ -235,4 +235,4 @@ spec:
## 参考
[Monitoring in the Kubernetes Era](https://www.datadoghq.com/blog/monitoring-kubernetes-era/)
- [Monitoring in the Kubernetes Era](https://www.datadoghq.com/blog/monitoring-kubernetes-era/)

View File

@ -98,7 +98,7 @@ EnvironmentFile=-/run/docker_opts.env
重启了docker后还要重启kubelet这时又遇到问题kubelet启动失败。报错
```bash
Mar 31 16:44:41 sz-pg-oam-docker-test-002.tendcloud.com kubelet[81047]: error: failed to run Kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "cgroupfs" is different from docker cgroup driver: "systemd"
Mar 31 16:44:41 test-002.jimmysong.io kubelet[81047]: error: failed to run Kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "cgroupfs" is different from docker cgroup driver: "systemd"
```
这是kubelet与docker的**cgroup driver**不一致导致的kubelet启动的时候有个`—cgroup-driver`参数可以指定为"cgroupfs"或者“systemd”。
@ -206,7 +206,7 @@ KUBELET_HOSTNAME="--hostname-override=172.20.0.113"
KUBELET_API_SERVER="--api-servers=http://172.20.0.113:8080"
#
## pod infrastructure container
KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=sz-pg-oam-docker-hub-001.tendcloud.com/library/pod-infrastructure:rhel7"
KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=harbor-001.jimmysong.io/library/pod-infrastructure:rhel7"
#
## Add your own!
KUBELET_ARGS="--cgroup-driver=systemd --cluster-dns=10.254.0.2 --experimental-bootstrap-kubeconfig=/etc/kubernetes/bootstrap.kubeconfig --kubeconfig=/etc/kubernetes/kubelet.kubeconfig --require-kubeconfig --cert-dir=/etc/kubernetes/ssl --cluster-domain=cluster.local --hairpin-mode promiscuous-bridge --serialize-image-pulls=false"
@ -341,7 +341,7 @@ systemctl status kube-proxy
我们创建一个nginx的service试一下集群是否可用。
```bash
$ kubectl run nginx --replicas=2 --labels="run=load-balancer-example" --image=sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9 --port=80
$ kubectl run nginx --replicas=2 --labels="run=load-balancer-example" --image=harbor-001.jimmysong.io/library/nginx:1.9 --port=80
deployment "nginx" created
$ kubectl expose deployment nginx --type=NodePort --name=example-service
service "example-service" exposed
@ -386,7 +386,7 @@ Commercial support is available at
</html>
```
提示上面的测试示例中使用的nginx是我的私有镜像仓库中的镜像`sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9`大家在测试过程中请换成自己的nginx镜像地址。
提示上面的测试示例中使用的nginx是我的私有镜像仓库中的镜像`harbor-001.jimmysong.io/library/nginx:1.9`大家在测试过程中请换成自己的nginx镜像地址。
访问`172.20.0.113:32724`或`172.20.0.114:32724`或者`172.20.0.115:32724`都可以得到nginx的页面。

View File

@ -91,11 +91,11 @@ TAG = v1
# Build for linux amd64
build:
GOOS=linux GOARCH=amd64 go build -o hello${TAG} main.go
docker build -t sz-pg-oam-docker-hub-001.tendcloud.com/library/hello:${TAG} .
docker build -t harbor-001.jimmysong.io/library/hello:${TAG} .
# Push to tenxcloud
push:
docker push sz-pg-oam-docker-hub-001.tendcloud.com/library/hello:${TAG}
docker push harbor-001.jimmysong.io/library/hello:${TAG}
# Clean
clean:
@ -130,7 +130,7 @@ spec:
spec:
containers:
- name: rolling-update-test
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/hello:v1
image: harbor-001.jimmysong.io/library/hello:v1
ports:
- containerPort: 9090
---
@ -194,7 +194,7 @@ kubectl apply -f rolling-update-test.yaml
也可以参考[Kubernetes Deployment Concept](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)中的方法,直接设置新的镜像。
```
kubectl set image deployment/rolling-update-test rolling-update-test=sz-pg-oam-docker-hub-001.tendcloud.com/library/hello:v2
kubectl set image deployment/rolling-update-test rolling-update-test=harbor-001.jimmysong.io/library/hello:v2
```
或者使用`kubectl edit deployment/rolling-update-test`修改镜像名称后保存。
@ -220,7 +220,7 @@ This is version 2.
举个例子:
```bash
$ kubectl -n spark-cluster rolling-update zeppelin-controller --image sz-pg-oam-docker-hub-001.tendcloud.com/library/zeppelin:0.7.1
$ kubectl -n spark-cluster rolling-update zeppelin-controller --image harbor-001.jimmysong.io/library/zeppelin:0.7.1
Created zeppelin-controller-99be89dbbe5cd5b8d6feab8f57a04a8b
Scaling up zeppelin-controller-99be89dbbe5cd5b8d6feab8f57a04a8b from 0 to 1, scaling down zeppelin-controller from 1 to 0 (keep 1 pods available, don't exceed 2 pods)
Scaling zeppelin-controller-99be89dbbe5cd5b8d6feab8f57a04a8b up to 1
@ -240,4 +240,4 @@ replicationcontroller "zeppelin-controller" rolling updated
[Simple Rolling Update](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/simple-rolling-update.md)
[使用kubernetes的deployment进行RollingUpdate](https://segmentfault.com/a/1190000008232770)
[使用kubernetes的deployment进行RollingUpdate](https://segmentfault.com/a/1190000008232770)

View File

@ -222,7 +222,7 @@ spec:
pod.beta.kubernetes.io/init-containers: '[
{
"name": "galera-init",
"image": "sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-galera-init:latest",
"image": "harbor-001.jimmysong.io/library/k8s-galera-init:latest",
"args": ["-service=mysql"],
"env": [
{
@ -256,7 +256,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: mysql
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/mariadb:10.1
image: harbor-001.jimmysong.io/library/mariadb:10.1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3306
@ -409,4 +409,4 @@ https://github.com/kubernetes/examples/blob/master/staging/volumes/cephfs/README
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#ceph-rbd
[Error creating rbd image: executable file not found in $PATH#38923](https://github.com/kubernetes/kubernetes/issues/38923)
[Error creating rbd image: executable file not found in $PATH#38923](https://github.com/kubernetes/kubernetes/issues/38923)

View File

@ -37,9 +37,9 @@ $ systemctl status glusterd.service
# 配置 hosts
$ vi /etc/hosts
172.20.0.113 sz-pg-oam-docker-test-001.tendcloud.com
172.20.0.114 sz-pg-oam-docker-test-002.tendcloud.com
172.20.0.115 sz-pg-oam-docker-test-003.tendcloud.com
172.20.0.113 test-001.jimmysong.io
172.20.0.114 test-002.jimmysong.io
172.20.0.115 test-003.jimmysong.io
```
```bash
@ -53,19 +53,19 @@ $ mkdir /opt/gfs_data
```bash
# 添加节点到 集群
# 执行操作的本机不需要probe 本机
[root@sz-pg-oam-docker-test-001 ~]#
gluster peer probe sz-pg-oam-docker-test-002.tendcloud.com
gluster peer probe sz-pg-oam-docker-test-003.tendcloud.com
[root@test-001 ~]#
gluster peer probe test-002.jimmysong.io
gluster peer probe test-003.jimmysong.io
# 查看集群状态
$ gluster peer status
Number of Peers: 2
Hostname: sz-pg-oam-docker-test-002.tendcloud.com
Hostname: test-002.jimmysong.io
Uuid: f25546cc-2011-457d-ba24-342554b51317
State: Peer in Cluster (Connected)
Hostname: sz-pg-oam-docker-test-003.tendcloud.com
Hostname: test-003.jimmysong.io
Uuid: 42b6cad1-aa01-46d0-bbba-f7ec6821d66d
State: Peer in Cluster (Connected)
```
@ -88,7 +88,7 @@ GlusterFS中的volume的模式有很多中包括以下几种
```bash
# 创建分布卷
$ gluster volume create k8s-volume transport tcp sz-pg-oam-docker-test-001.tendcloud.com:/opt/gfs_data sz-pg-oam-docker-test-002.tendcloud.com:/opt/gfs_data sz-pg-oam-docker-test-003.tendcloud.com:/opt/gfs_data force
$ gluster volume create k8s-volume transport tcp test-001.jimmysong.io:/opt/gfs_data test-002.jimmysong.io:/opt/gfs_data test-003.jimmysong.io:/opt/gfs_data force
# 查看volume状态
$ gluster volume info
@ -100,9 +100,9 @@ Snapshot Count: 0
Number of Bricks: 3
Transport-type: tcp
Bricks:
Brick1: sz-pg-oam-docker-test-001.tendcloud.com:/opt/gfs_data
Brick2: sz-pg-oam-docker-test-002.tendcloud.com:/opt/gfs_data
Brick3: sz-pg-oam-docker-test-003.tendcloud.com:/opt/gfs_data
Brick1: test-001.jimmysong.io:/opt/gfs_data
Brick2: test-002.jimmysong.io:/opt/gfs_data
Brick3: test-003.jimmysong.io:/opt/gfs_data
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
@ -151,9 +151,9 @@ $ yum install -y glusterfs glusterfs-fuse
$ vi /etc/hosts
172.20.0.113 sz-pg-oam-docker-test-001.tendcloud.com
172.20.0.114 sz-pg-oam-docker-test-002.tendcloud.com
172.20.0.115 sz-pg-oam-docker-test-003.tendcloud.com
172.20.0.113 test-001.jimmysong.io
172.20.0.114 test-002.jimmysong.io
172.20.0.115 test-003.jimmysong.io
```
因为我们glusterfs跟kubernetes集群复用主机因为此这一步可以省去。
@ -342,15 +342,14 @@ $ kubectl exec -it nginx-dm-3698525684-g0mvt -- ls -lt /usr/share/nginx/html/ind
# 验证 glusterfs
# 因为我们使用分布卷,所以可以看到某个节点中有文件
[root@sz-pg-oam-docker-test-001 ~] ls /opt/gfs_data/
[root@sz-pg-oam-docker-test-002 ~] ls /opt/gfs_data/
[root@test-001 ~] ls /opt/gfs_data/
[root@test-002 ~] ls /opt/gfs_data/
index.html
[root@sz-pg-oam-docker-test-003 ~] ls /opt/gfs_data/
[root@test-003 ~] ls /opt/gfs_data/
```
## 参考
[CentOS 7 安装 GlusterFS](http://www.cnblogs.com/jicki/p/5801712.html)
[GlusterFS with kubernetes](https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/glusterfs)
- [CentOS 7 安装 GlusterFS](http://www.cnblogs.com/jicki/p/5801712.html)
- [GlusterFS with kubernetes](https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/glusterfs)

View File

@ -90,8 +90,8 @@ Events:
Warning FailedMount 27m kubelet, 172.20.0.115 Unable to mount volumes for pod "jenkins-668dfbd847-vhg4c_default(8e2ad467-f1e5-11e7-aa47-f4e9d49f8ed0)": timeout expired waiting for volumes to attach/mount for pod "default"/"jenkins-668dfbd847-vhg4c". list of unattached/unmounted volumes=[jenkins-home]
Warning FailedSync 27m kubelet, 172.20.0.115 Error syncing pod
Normal SuccessfulMountVolume 26m kubelet, 172.20.0.115 MountVolume.SetUp succeeded for volume "pvc-8e203e86-f1e5-11e7-aa47-f4e9d49f8ed0"
Normal Pulling 26m kubelet, 172.20.0.115 pulling image "sz-pg-oam-docker-hub-001.tendcloud.com/library/jenkins:lts"
Normal Pulled 26m kubelet, 172.20.0.115 Successfully pulled image "sz-pg-oam-docker-hub-001.tendcloud.com/library/jenkins:lts"
Normal Pulling 26m kubelet, 172.20.0.115 pulling image "harbor-001.jimmysong.io/library/jenkins:lts"
Normal Pulled 26m kubelet, 172.20.0.115 Successfully pulled image "harbor-001.jimmysong.io/library/jenkins:lts"
Normal Created 26m kubelet, 172.20.0.115 Created container
Normal Started 26m kubelet, 172.20.0.115 Started container
```
@ -120,4 +120,4 @@ OpenEBS的存储策略使用StorageClaass实现包括如下的StorageClass
- [OpenEBS Documentation](http://openebs.readthedocs.io/)
- [CentOS 7.x 下配置iSCSI网络存储](http://blog.csdn.net/wh211212/article/details/52981305)
- [Configure iSCSI Initiator](https://www.server-world.info/en/note?os=CentOS_7&p=iscsi&f=2)
- [RHEL7: Configure a system as either an iSCSI target or initiator that persistently mounts an iSCSI target.](https://www.certdepot.net/rhel7-configure-iscsi-target-initiator-persistently/)
- [RHEL7: Configure a system as either an iSCSI target or initiator that persistently mounts an iSCSI target.](https://www.certdepot.net/rhel7-configure-iscsi-target-initiator-persistently/)

View File

@ -4,13 +4,13 @@
需要用到的镜像有:
- sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus-alertmanager:v0.7.1
- sz-pg-oam-docker-hub-001.tendcloud.com/library/grafana:4.2.0
- sz-pg-oam-docker-hub-001.tendcloud.com/library/giantswarm-tiny-tools:latest
- sz-pg-oam-docker-hub-001.tendcloud.com/library/prom-prometheus:v1.7.0
- sz-pg-oam-docker-hub-001.tendcloud.com/library/kube-state-metrics:v1.0.1
- sz-pg-oam-docker-hub-001.tendcloud.com/library/dockermuenster-caddy:0.9.3
- sz-pg-oam-docker-hub-001.tendcloud.com/library/prom-node-exporter:v0.14.0
- harbor-001.jimmysong.io/library/prometheus-alertmanager:v0.7.1
- harbor-001.jimmysong.io/library/grafana:4.2.0
- harbor-001.jimmysong.io/library/giantswarm-tiny-tools:latest
- harbor-001.jimmysong.io/library/prom-prometheus:v1.7.0
- harbor-001.jimmysong.io/library/kube-state-metrics:v1.0.1
- harbor-001.jimmysong.io/library/dockermuenster-caddy:0.9.3
- harbor-001.jimmysong.io/library/prom-node-exporter:v0.14.0
同时备份到时速云:
@ -132,4 +132,4 @@ curl -sX GET -H "Authorization:bearer `cat /var/run/secrets/kubernetes.io/servic
[RBAC——基于角色的访问控制](../guide/rbac.md)
[wait-for-endpoints init-containers fails to load with k8s 1.6.0 #56](https://github.com/giantswarm/kubernetes-prometheus/issues/56)
[wait-for-endpoints init-containers fails to load with k8s 1.6.0 #56](https://github.com/giantswarm/kubernetes-prometheus/issues/56)

View File

@ -61,7 +61,7 @@ Conduit注入的时候需要用到如下两个镜像
查看conduit向yaml文件中注入了哪些配置我们使用my-nginx.yaml为例
```bash
conduit inject --init-image sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-proxy-init --proxy-image sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-proxy my-nginx.yaml|kubectl apply -f -
conduit inject --init-image harbor-001.jimmysong.io/library/runconduit-proxy-init --proxy-image harbor-001.jimmysong.io/library/runconduit-proxy my-nginx.yaml|kubectl apply -f -
```
**注意:**只需要指定镜像名称即可tag与使用的conduit server版本相同会自动注入。
@ -82,7 +82,7 @@ spec:
spec:
containers:
- name: my-nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80
---
@ -124,7 +124,7 @@ spec:
run: my-nginx
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
- image: harbor-001.jimmysong.io/library/nginx:1.9
name: my-nginx
ports:
- containerPort: 80
@ -152,7 +152,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-proxy:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-proxy:v0.1.0
imagePullPolicy: IfNotPresent
name: conduit-proxy
ports:
@ -171,7 +171,7 @@ spec:
- "4190"
- -u
- "2102"
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-proxy-init:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-proxy-init:v0.1.0
imagePullPolicy: IfNotPresent
name: conduit-init
resources: {}
@ -203,11 +203,11 @@ spec:
使用下面的命令部署官方提供的示例应用:
```bash
curl https://raw.githubusercontent.com/rootsongjc/kubernetes-handbook/master/manifests/conduit/emojivoto.yml | conduit inject --init-image sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-proxy-init --proxy-image sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-proxy - --skip-inbound-ports=80 | kubectl apply -f -
curl https://raw.githubusercontent.com/rootsongjc/kubernetes-handbook/master/manifests/conduit/emojivoto.yml | conduit inject --init-image harbor-001.jimmysong.io/library/runconduit-proxy-init --proxy-image harbor-001.jimmysong.io/library/runconduit-proxy - --skip-inbound-ports=80 | kubectl apply -f -
```
**注意:**其中使用的镜像地址已经改为我的私有镜像仓库地址,大家使用时请注意修改。
## 参考
[Getting started - conduit.io](https://conduit.io/getting-started/)
[Getting started - conduit.io](https://conduit.io/getting-started/)

View File

@ -33,7 +33,7 @@ openzipkin/zipkin:1.20
tutum/dnsutils:latest
```
这些镜像可以直接通过 Docker Hub 获取,我将它们下载下来并上传到了自己的私有镜像仓库 `sz-pg-oam-docker-hub-001.tendcloud.com` 中下文中用到的镜像皆来自我的私有镜像仓库yaml 配置见 [linkerd](../manifests/linkerd) 目录,并在使用时将配置中的镜像地址修改为你自己的。
这些镜像可以直接通过 Docker Hub 获取,我将它们下载下来并上传到了自己的私有镜像仓库 `harbor-001.jimmysong.io` 中下文中用到的镜像皆来自我的私有镜像仓库yaml 配置见 [linkerd](../manifests/linkerd) 目录,并在使用时将配置中的镜像地址修改为你自己的。
## 部署
@ -286,4 +286,4 @@ Hello (172.30.60.14) world (172.30.71.19)!!
- [A Service Mesh for Kubernetes](https://cdn2.hubspot.net/hubfs/2818724/A%20Service%20Mesh%20for%20Kubernetes_Final.pdf)
- [dtab](https://linkerd.io/in-depth/dtabs/)
- [dtab](https://linkerd.io/in-depth/dtabs/)

View File

@ -105,9 +105,9 @@ Spark driver 其实可以运行在 kubernetes 集群内部cluster mode
--kubernetes-namespace spark-cluster \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/kubespark-spark-driver:v2.1.0-kubernetes-0.3.1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/kubespark-spark-executor:v2.1.0-kubernetes-0.3.1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/kubespark-spark-init:v2.1.0-kubernetes-0.3.1 \
--conf spark.kubernetes.driver.docker.image=harbor-001.jimmysong.io/library/kubespark-spark-driver:v2.1.0-kubernetes-0.3.1 \
--conf spark.kubernetes.executor.docker.image=harbor-001.jimmysong.io/library/kubespark-spark-executor:v2.1.0-kubernetes-0.3.1 \
--conf spark.kubernetes.initcontainer.docker.image=harbor-001.jimmysong.io/library/kubespark-spark-init:v2.1.0-kubernetes-0.3.1 \
local:///opt/spark/examples/jars/spark-examples_2.11-2.1.0-k8s-0.3.1-SNAPSHOT.jar
```
@ -165,8 +165,8 @@ dev/make-distribution.sh --tgz -Phadoop-2.7 -Pkubernetes
将该脚本放在 `dist` 目录下,执行:
```bash
./build-push-docker-images.sh -r sz-pg-oam-docker-hub-001.tendcloud.com/library -t v2.1.0-kubernetes-0.3.1-1 build
./build-push-docker-images.sh -r sz-pg-oam-docker-hub-001.tendcloud.com/library -t v2.1.0-kubernetes-0.3.1-1 push
./build-push-docker-images.sh -r harbor-001.jimmysong.io/library -t v2.1.0-kubernetes-0.3.1-1 build
./build-push-docker-images.sh -r harbor-001.jimmysong.io/library -t v2.1.0-kubernetes-0.3.1-1 push
```
**注意:**如果你使用的 MacOSbash 的版本可能太低,执行改脚本将出错,请检查你的 bash 版本:
@ -188,13 +188,13 @@ brew install bash
编译并上传镜像到我的私有镜像仓库,将会构建出如下几个镜像:
```bash
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-resource-staging-server:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-shuffle:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor-py:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver-py:v2.1.0-kubernetes-0.3.1-1
harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
harbor-001.jimmysong.io/library/spark-resource-staging-server:v2.1.0-kubernetes-0.3.1-1
harbor-001.jimmysong.io/library/spark-init:v2.1.0-kubernetes-0.3.1-1
harbor-001.jimmysong.io/library/spark-shuffle:v2.1.0-kubernetes-0.3.1-1
harbor-001.jimmysong.io/library/spark-executor:v2.1.0-kubernetes-0.3.1-1
harbor-001.jimmysong.io/library/spark-executor-py:v2.1.0-kubernetes-0.3.1-1
harbor-001.jimmysong.io/library/spark-driver-py:v2.1.0-kubernetes-0.3.1-1
```
## 运行测试
@ -210,9 +210,9 @@ sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver-py:v2.1.0-kubernetes
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.driver.docker.image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=harbor-001.jimmysong.io/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=harbor-001.jimmysong.io/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
local:///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.jar
```
@ -260,9 +260,9 @@ local:///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.ja
volumes: spark-token-zr8wv
node name: 172.20.0.114
start time: 2017-09-14T06:59:01Z
container images: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
container images: harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
phase: Pending
status: [ContainerStatus(containerID=null, image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=false, restartCount=0, state=ContainerState(running=null, terminated=null, waiting=ContainerStateWaiting(message=null, reason=ContainerCreating, additionalProperties={}), additionalProperties={}), additionalProperties={})]
status: [ContainerStatus(containerID=null, image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=false, restartCount=0, state=ContainerState(running=null, terminated=null, waiting=ContainerStateWaiting(message=null, reason=ContainerCreating, additionalProperties={}), additionalProperties={}), additionalProperties={})]
2017-09-14 14:59:03 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1505372339796-driver
namespace: spark-cluster
@ -273,9 +273,9 @@ local:///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.ja
volumes: spark-token-zr8wv
node name: 172.20.0.114
start time: 2017-09-14T06:59:01Z
container images: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
container images: harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
phase: Running
status: [ContainerStatus(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6cd4c62, image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=docker-pullable://sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver@sha256:beb92a3e3f178e286d9e5baebdead88b5ba76d651f347ad2864bb6f8eda26f94, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=true, restartCount=0, state=ContainerState(running=ContainerStateRunning(startedAt=2017-09-14T06:59:02Z, additionalProperties={}), terminated=null, waiting=null, additionalProperties={}), additionalProperties={})]
status: [ContainerStatus(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6cd4c62, image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=docker-pullable://harbor-001.jimmysong.io/library/spark-driver@sha256:beb92a3e3f178e286d9e5baebdead88b5ba76d651f347ad2864bb6f8eda26f94, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=true, restartCount=0, state=ContainerState(running=ContainerStateRunning(startedAt=2017-09-14T06:59:02Z, additionalProperties={}), terminated=null, waiting=null, additionalProperties={}), additionalProperties={})]
2017-09-14 14:59:12 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1505372339796-driver
namespace: spark-cluster
@ -286,14 +286,14 @@ local:///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.ja
volumes: spark-token-zr8wv
node name: 172.20.0.114
start time: 2017-09-14T06:59:01Z
container images: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
container images: harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
phase: Succeeded
status: [ContainerStatus(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6cd4c62, image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=docker-pullable://sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver@sha256:beb92a3e3f178e286d9e5baebdead88b5ba76d651f347ad2864bb6f8eda26f94, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=false, restartCount=0, state=ContainerState(running=null, terminated=ContainerStateTerminated(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6cd4c62, exitCode=0, finishedAt=2017-09-14T06:59:11Z, message=null, reason=Completed, signal=null, startedAt=null, additionalProperties={}), waiting=null, additionalProperties={}), additionalProperties={})]
status: [ContainerStatus(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6cd4c62, image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=docker-pullable://harbor-001.jimmysong.io/library/spark-driver@sha256:beb92a3e3f178e286d9e5baebdead88b5ba76d651f347ad2864bb6f8eda26f94, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=false, restartCount=0, state=ContainerState(running=null, terminated=ContainerStateTerminated(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6cd4c62, exitCode=0, finishedAt=2017-09-14T06:59:11Z, message=null, reason=Completed, signal=null, startedAt=null, additionalProperties={}), waiting=null, additionalProperties={}), additionalProperties={})]
2017-09-14 14:59:12 INFO LoggingPodStatusWatcherImpl:54 - Container final statuses:
Container name: spark-kubernetes-driver
Container image: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
Container image: harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
Container state: Terminated
Exit code: 0
2017-09-14 14:59:12 INFO Client:54 - Application spark-pi finished.
@ -341,9 +341,9 @@ kubectl create -f conf/kubernetes-resource-staging-server.yaml
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.driver.docker.image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=harbor-001.jimmysong.io/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=harbor-001.jimmysong.io/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.resourceStagingServer.uri=http://172.20.0.114:31000 \
../examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.jar
```
@ -378,9 +378,9 @@ kubectl create -f conf/kubernetes-resource-staging-server.yaml
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.driver.docker.image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=harbor-001.jimmysong.io/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=harbor-001.jimmysong.io/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.resourceStagingServer.uri=http://172.20.0.114:31000 \
~/Downloads/tendcloud_2.10-1.0.jar
```
@ -436,9 +436,9 @@ memory limit 的值是根据 memory request 的值加上 `spark.kubernetes.execu
--conf spark.kubernetes.executor.memoryOverhead=2g \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.driver.docker.image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=harbor-001.jimmysong.io/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=harbor-001.jimmysong.io/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
local:///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.jar 10000000
```
@ -476,4 +476,4 @@ CMD SPARK_CLASSPATH="${SPARK_HOME}/jars/*" && \
- [The anatomy of Spark applications on Kubernetes - banzaicloud.com](https://banzaicloud.com/blog/spark-k8s-internals/)
- [Monitoring Apache Spark with Prometheus - banzaicloud.com](https://banzaicloud.com/blog/spark-monitoring/)
- [Running Zeppelin Spark notebooks on Kubernetes - banzaicloud.com](https://banzaicloud.com/blog/zeppelin-spark-k8/)
- [Apache Spark CI/CD workflow howto - banzaicloud.com](https://banzaicloud.com/blog/pipeline-howto/)
- [Apache Spark CI/CD workflow howto - banzaicloud.com](https://banzaicloud.com/blog/pipeline-howto/)