Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1629 commits
Select commit Hold shift + click to select a range
8fe35f5
Use PVC namespace when provisioning GlusterFS volumes.
humblec Oct 19, 2016
9210b3b
fix tests by declaring testdata
mikedanese Oct 19, 2016
a443d8d
Move swagger+openapi setup to routes and decouple from run
sttts Sep 30, 2016
c4bdc64
rename build/ to build-tools/
mikedanese Oct 24, 2016
bc96d81
add genrule for test bindata
mikedanese Oct 22, 2016
e87fd7b
Remove 'this is HEAD' warning on docs
thockin Oct 25, 2016
bf35ee1
versionize-docs is dead
thockin Oct 25, 2016
2ec0f95
Add vSphere Volume Examples
abrarshivani Oct 17, 2016
c99b394
Merge pull request #34996 from abrarshivani/vsphere_volumes_examples
Oct 26, 2016
465aa2f
Merge pull request #35546 from thockin/kill-head-scary-warning-on-master
bgrant0607 Oct 26, 2016
01b41bc
Rename PetSet API to StatefulSet
janetkuo Oct 26, 2016
1825c65
(Auto-gen) Run update-all.sh, codecgen, munge docs, and bazel
janetkuo Oct 26, 2016
b5a21d8
azure disk volume: support storage class and dynamic provisioning
rootfs Oct 17, 2016
2fddf46
include multiple versions in clientset
Oct 21, 2016
588fa6f
Update Secret.type examples used for provisioning.
jsafrane Oct 31, 2016
f8e0608
Fix typos and linted_packages sorting
koep Oct 18, 2016
1e6f198
Improve CockroachDB example
a-robinson Oct 31, 2016
31058e0
Make GenericApiServer.Run interruptable and fail on first listen
sttts Oct 21, 2016
283a10c
Merge pull request #30091 from rootfs/azure-storage
Nov 2, 2016
6f92923
Merge pull request #33656 from koep/typos
thockin Nov 2, 2016
42634e8
Remove a few versioned-warnings that snuck in
thockin Nov 2, 2016
f48c788
Replace apps/v1alpha1 with apps/v1beta1 and manually remove generated…
janetkuo Oct 27, 2016
29fd27a
(Auto-gen) Run hack/update-all & update-bazel & update linted packages
janetkuo Nov 2, 2016
4bbcd00
Merge pull request #35731 from janetkuo/statefulset-v1beta1
Nov 3, 2016
a4f2650
add secret type to RBD secrets in examples and e2e test
rootfs Nov 3, 2016
7c8101a
Rename PetSet to StatefulSet in docs and examples.
jimmycuadra Oct 28, 2016
5b4f613
Merge pull request #35905 from jsafrane/secret-types
Nov 6, 2016
e404974
Merge pull request #35776 from jimmycuadra/petset-rename-docs-examples
Nov 6, 2016
917e65c
add authz checks to allowed policies admission
Sep 20, 2016
b1b901a
Update OWNERS approvers and reviewers: examples/mysql-wordpress-pd
Nov 9, 2016
04228a1
Update https-nginx example README and inotifywait cmd
Nov 8, 2016
78db542
Merge pull request #36385 from ymqytw/update-nginx-example
Nov 10, 2016
039afde
Update OWNERS
apelisse Nov 10, 2016
14ff380
Remove namespaces from all examples.
foxish Nov 11, 2016
7846347
Update gluster setup readme.
humblec Nov 13, 2016
8f2457c
fix munge-docs build errors
sebgoa Nov 17, 2016
b32e463
Remove a few versioned-warnings that snuck in, again
thockin Nov 18, 2016
45e5264
At present, admin doesn't have the privilege to choose the
humblec Nov 23, 2016
4f250f5
Fix notice in redis-slave example
nebril Nov 23, 2016
3008946
Remove initialized annotation from statefulset examples
janetkuo Nov 21, 2016
e9d3a1c
Remove alpha limitation on PetSet in cassandra example
janetkuo Nov 21, 2016
5ebe5f1
Bumped the Cassandra version to 3.9 for the storage examples Docker i…
mstump Nov 19, 2016
c932ca4
Move GroupVersion* to pkg/runtime/schema
smarterclayton Nov 14, 2016
aa81e9b
Merge pull request #36715 from humblec/glusterfs-doc-update
Nov 28, 2016
db6839e
Merge pull request #37120 from thockin/scary-warning-again
Nov 28, 2016
7da44af
Merge pull request #34894 from allancaffee/patch-1
Nov 28, 2016
be62cd2
Merge pull request #37363 from nebril/example-typo-fix
Nov 28, 2016
ad7a234
Cache fields for filtering in watchCache.
wojtek-t Nov 16, 2016
82f9b6b
split generic etcdoption out of main struct
deads2k Nov 9, 2016
4811083
split secure serving options
deads2k Nov 9, 2016
4d18fa2
split insecure serving options
deads2k Nov 9, 2016
f29fdac
remove some options from mega-struct
deads2k Nov 9, 2016
4d6eae7
split out authentication options
deads2k Nov 9, 2016
eba28f6
Update selenium docker images
aledbf Nov 30, 2016
455c6bd
Merge pull request #37231 from janetkuo/stateful-set-example-files
Dec 1, 2016
8be6732
fix scheduler extender example
Dec 1, 2016
234a76a
Merge pull request #36437 from humblec/glusterfs-clusterid-prov
Dec 1, 2016
a3a8748
glusterfs: implement GID security in the dynamic provisioner
obnoxxx Dec 2, 2016
ee95a25
Merge pull request #36889 from wojtek-t/reuse_fields_and_labels
Dec 3, 2016
88a9c7d
Move RESTStorageProvider interface into pkg/master
sttts Nov 28, 2016
d3f28a9
Merge pull request #37785 from tanshanshan/fix-small
Dec 3, 2016
adf111b
Merge pull request #37547 from sttts/sttts-cut-off-genericapserver-fr…
Dec 3, 2016
eeddfe8
updating wordpress version to latest 4.6.1
lvnilesh Dec 4, 2016
d8e1859
Merge pull request #37886 from obnoxxx/gluster-dp-gid
Dec 4, 2016
224d4aa
Stratify certificate loading and self-sign cert generation
sttts Dec 1, 2016
0d9be17
Merge pull request #34042 from elsonrodriguez/rbd-docs-fix-flow
Dec 5, 2016
cce6b1c
Merge pull request #37830 from sttts/sttts-stratify-cert-generation
Dec 5, 2016
c6fa591
Adding correct secret type for Ceph RBD storageclass provisioner exam…
elsonrodriguez Dec 5, 2016
f20e721
glusterfs: Fix all gid types to int to prevent failures on 32bit systems
obnoxxx Dec 5, 2016
a3f7c29
Merge pull request #38137 from obnoxxx/gluster-dp-gid-fix
Dec 6, 2016
93f023f
remove the create-external-load-balancer flag in cmd/expose.go
tianshapjq Dec 6, 2016
2d8ab87
update delegating auth to include front-proxy
deads2k Dec 5, 2016
f96d477
join client CA bundles into the accept path for genericapiserver
deads2k Dec 5, 2016
a712626
Merge pull request #38128 from elsonrodriguez/rbd-docs-secret-fix
Dec 7, 2016
c354998
Merge pull request #38062 from lvnilesh/patch-3
Dec 8, 2016
1978840
Merge pull request #37701 from aledbf/update-selenium-example
Dec 8, 2016
dd974b7
Merge pull request #37145 from mstump/issue-34422-bump-cassandra-version
Dec 8, 2016
5760481
Refactor REST storage to use generic defaults
enj Dec 1, 2016
92ef843
fix examples/ compilation so that test/ also compiles
mikedanese Dec 8, 2016
cec938f
genericapiserver: unify swagger and openapi in config
sttts Dec 13, 2016
14700b6
Rename build-tools/ back to build/
ixdy Dec 14, 2016
648c918
genericapiserver: move MasterCount and service options into master
sttts Dec 6, 2016
4310b4b
Clean up apiserver and federation defaulting and validation
sttts Dec 14, 2016
52c93d9
Update bazel
sttts Dec 16, 2016
fbea3e2
Remove all MAINTAINER statements in the codebase as they aren't very …
luxas Dec 17, 2016
7a2f17c
fix readme
Dec 19, 2016
cf62f20
decouple genericapiserver from non-generic authenticator
deads2k Dec 21, 2016
3c4a8fb
examples: use 'kubectl scale' in cockroach statefulset example
0xmichalis Dec 23, 2016
7636113
autogenerated
mikedanese Dec 29, 2016
deeabe4
Add pod anti-affinity and a disruption budget to cockroachdb example
a-robinson Dec 21, 2016
30338f3
Merge pull request #38927 from luxas/remove_maintainer
Dec 30, 2016
afed335
Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver…
sttts Jan 2, 2017
b12c482
Update New Relic sample docs with dynamic hostname info
bookshelfdave Jan 3, 2017
8b40d63
Merge pull request #39376 from metadave/newrelic_cluster_prefix_hostn…
Jan 3, 2017
2a45041
Move apiserver cloudprovider dep into kubeapiserver
sttts Jan 4, 2017
b3859ed
Merge pull request #39435 from sttts/sttts-cloudprovider-to-master
Jan 5, 2017
065ce13
Enable auto-generating sources rules
ixdy Jan 3, 2017
70a5656
Let admin configure the volume type and parameters for gluster DP vol…
humblec Jan 6, 2017
28fbd67
Use the same name in volumeMounts and volumes
xiangfeiz Jan 6, 2017
ad9e39d
Move provisioning examples out of 'experimental' directory.
jsafrane Jan 6, 2017
76cec6a
Add OMS example
Jan 6, 2017
2c303d5
Correct PVC name in Pod spec
xiangfeiz Jan 9, 2017
9b63662
examples: fix OpenShift example
0xmichalis Jan 8, 2017
47b8002
Always --pull in docker build to ensure recent base images
ixdy Jan 10, 2017
fe58f14
Merge pull request #39577 from kargakis/fix-openshift-example
Jan 11, 2017
9fda98a
PodFitsPorts has been replaced by PodFitsHostPorts
Jan 11, 2017
8cb95e7
start the apimachinery repo
deads2k Jan 11, 2017
b69fd3f
fixing Cassandra shutdown example to avoid data corruption
deimosfr Dec 23, 2016
9243aa1
mechanical repercussions
deads2k Jan 12, 2017
3ec4cc8
mechanicals
deads2k Jan 13, 2017
d1a5c59
Merge pull request #39715 from tanshanshan/scheduler-example
Jan 16, 2017
621ae3e
Merge pull request #39876 from deads2k/generic-20-deps-03
Jan 16, 2017
3030b80
move name generation to generic api server storage helpers
deads2k Jan 13, 2017
16d903a
Fix imports
sttts Jan 17, 2017
a920079
Update bazel
sttts Jan 17, 2017
4ddfa71
Correct import statements
smarterclayton Jan 14, 2017
dca3d84
Merge pull request #36512 from apelisse/owners-examples-mysql-wordpre…
Jan 17, 2017
f523d1f
Merge pull request #39709 from smarterclayton/object_meta
Jan 17, 2017
474263e
genericapiserver: fix imports
sttts Jan 17, 2017
ba6bffd
move pkg/fields to apimachinery
deads2k Jan 19, 2017
af19a8f
Updated top level owners file to match new format
grodrigues3 Jan 17, 2017
a22ac92
fix kube-dns link in examples
sjenning Jan 20, 2017
c6978e3
Merge pull request #40221 from sjenning/fix-munge-docs
Jan 20, 2017
967f9c8
Merge pull request #39199 from deimosfr/cassandra_exemple_fix_shutdown
Jan 23, 2017
edf8f58
fix rbd storage class indent
rootfs Jan 23, 2017
440421a
refactor: move ListOptions references to metav1
smarterclayton Jan 22, 2017
97132cd
generated: informer,client
smarterclayton Jan 22, 2017
5441d4a
pkg/util/flag: move to k8s.io/apiserver
sttts Jan 23, 2017
21d7889
Update generated files
sttts Jan 23, 2017
76ef770
Merge pull request #38952 from tanshanshan/fix-doc
Jan 24, 2017
30a675a
Merge pull request #40216 from sttts/sttts-more-cutoffs
Jan 25, 2017
a9def6e
Merge pull request #39103 from a-robinson/v1.5
Jan 25, 2017
e1b5106
Merge pull request #39523 from xiangfeiz/fixVsphereVolumeExample
Jan 25, 2017
b37545e
Updated the document links in examples/guestbook README.
xingzhou Dec 21, 2016
8a7c766
Merge pull request #40313 from rootfs/rbd-doc-fix
Jan 25, 2017
d9c31f3
Merge pull request #39538 from OguzPastirmaci/master
Jan 26, 2017
2410879
move genericapiserver authenticator and authorizer factories
deads2k Jan 25, 2017
1b90b57
move storage/storagebackend to apiserver
deads2k Jan 26, 2017
a097416
remove storage dependency on api
deads2k Jan 26, 2017
34b257d
move pkg/storage to apiserver
deads2k Jan 31, 2017
8a38818
Upgrade Hazelcast example with the latest hazelcast-kubernetes-bootst…
oscerd Jan 8, 2017
36a35d9
Remove alpha provisioning
jsafrane Feb 1, 2017
d8c30ec
move apiserver options
deads2k Feb 1, 2017
2442e41
pkg/storage/etcd: cut off pkg/api scheme
sttts Feb 1, 2017
9fcfd12
pkg/genericapiserver/server: cut off from pkg/api
sttts Feb 2, 2017
8239957
Mechanical fixup imports: pkg/genericapiserver
sttts Feb 2, 2017
2718131
Update generated files
sttts Feb 2, 2017
8b7b2e3
examples: PV docs clarify Azure storage account restriction
colemickens Feb 3, 2017
11da768
Add portals field to iscsi volume source to achieve multipathing.
humblec Feb 6, 2017
853eb22
Docs updated for CLI deprecations
jorahn Feb 6, 2017
409dcf1
apiserver command line options lead to config
deads2k Feb 3, 2017
5f3434a
Merge pull request #38183 from tianshapjq/remove-create-external-load…
Feb 7, 2017
5be33aa
Replace uses of --config with --pod-manifest-path
mtaufen Jan 19, 2017
9c3834e
streamline etcd options for aggregated api server
deads2k Feb 7, 2017
5c9304e
remove duplication of RESTOptionsGetter for kube
deads2k Feb 7, 2017
e2166bd
Merge pull request #39580 from oscerd/hazelcast-example-upgrade
Feb 8, 2017
fe8daf1
Merge pull request #40048 from mtaufen/remove-deprecated-flags
Feb 9, 2017
5a6b54a
Merge pull request #41136 from deads2k/apiserver-10-example
Feb 9, 2017
521de49
Add Minio example
nitisht Feb 13, 2017
d595cb9
Updated read
nitisht Feb 13, 2017
a84c8df
Updated Readme
nitisht Feb 13, 2017
06fb43c
Merge pull request #39928 from humblec/iscsi-multipath-backuptp
Feb 13, 2017
2fed4c6
Update rbac data to v1beta1
liggitt Feb 14, 2017
4f947bf
Added detailed steps
nitisht Feb 14, 2017
ee198d0
Fix links
nitisht Feb 14, 2017
f7fadf6
Fix links
nitisht Feb 14, 2017
e30e9aa
Add distributed Minio example
nitisht Feb 14, 2017
24e2a94
Fix statefulset e2e test
a-robinson Feb 14, 2017
6047468
Merge pull request #41412 from a-robinson/test
Feb 14, 2017
20241c6
Added absolute URLs for config yaml files
nitisht Feb 15, 2017
1f7092a
Merge pull request #41383 from liggitt/v1beta1-cleanup
Feb 15, 2017
c8c3200
k8s.io/apiserver: fixup imports and renamed packages
sttts Feb 11, 2017
4cc22ea
k8s.io/apiserver: straighten EtcdOptions, backend Config and kube RES…
sttts Feb 11, 2017
bf9053b
Update bazel
sttts Feb 11, 2017
b7b9dd3
Add OWNERS file for CockroachDB example
a-robinson Feb 15, 2017
149a5f4
Merge pull request #40000 from jsafrane/storage-ga-remove-alpha
Feb 16, 2017
14dce64
Revert "Remove alpha provisioning"
shyamjvs Feb 16, 2017
40a47e7
Updated the service type
nitisht Feb 20, 2017
57eec50
Merge pull request #41036 from jorahn/patch-1
Feb 20, 2017
6b345fd
Merge pull request #41515 from a-robinson/owners
Feb 20, 2017
b9b2270
Fix for Support selection of datastore for dynamic provisioning in vS…
BaluDontu Feb 17, 2017
32dfa63
- scheduler extenders that are capable of maintaining their own
sarat-k Feb 1, 2017
e3394ef
enable error
timchenxiaoyu Feb 24, 2017
c96252a
daemon not deamon
timchenxiaoyu Feb 24, 2017
b10be92
Add support for attacher/detacher interface in Flex volume
chakri-nelluri Feb 21, 2017
97ce0c7
PodSecurityPolicy example: fix explanation
ericchiang Feb 25, 2017
91d25a9
Fixing a couple of things in the example, and bumping docker version
chrislovecnm Feb 26, 2017
815bbce
Merge pull request #41119 from sarat-k/master
Feb 26, 2017
6fe386e
update the signing key for percona debian and ubuntu packages
dixudx Feb 9, 2017
3913646
Merge pull request #42044 from timchenxiaoyu/daemonnotdeamon
Feb 27, 2017
526ceaf
Merge pull request #41804 from chakri-nelluri/flex
Feb 27, 2017
9fc6c3e
tweak defaults for recommended apiserver options
deads2k Feb 24, 2017
2465c92
remove example apiserver replaced by sample and test/integration/exam…
deads2k Feb 24, 2017
7e61928
Enable storage class support in Azure File volume
rootfs Feb 22, 2017
ef1b06f
Portworx Volume Driver in Kubernetes
adityadani Dec 19, 2016
b33d3e6
Merge pull request #42113 from chrislovecnm/cassandra-update
Mar 1, 2017
1bd8eb4
fix satisfy typo
timchenxiaoyu Mar 2, 2017
01a0c0b
Add example for how to use vSphere volumes in Stateful Sets
Mar 2, 2017
60bc710
Addition of ScaleIO Kubernetes Volume Plugin
vladimirvivien Nov 19, 2016
4ec46fa
Fix several typos in the docs of persistent volume provisioning
yongtang Mar 4, 2017
3316cc2
Replace links to Helm Charts in example guidelines
pierreozoux Mar 6, 2017
56e0ebb
Update examples with storage.k8s.io/v1
jsafrane Mar 7, 2017
eff22b3
Updated as per review comments.
nitisht Mar 7, 2017
a1fcf13
Merged Minio standalone and distributed in one doc
nitisht Mar 14, 2017
6222460
Configure example pod namespaces
liggitt Mar 14, 2017
bf0c142
Update ScaleIO volume plugin default readOnly value
vladimirvivien Mar 9, 2017
1ad21f4
upgrade wordpress to 4.7.3 latest
Mar 16, 2017
7691624
Merge pull request #43086 from liggitt/examples-permissions
Mar 16, 2017
974ea7e
Update flex volume 1.6 documentation.
chakri-nelluri Mar 17, 2017
8a1af31
Upgrade to Hazelcast-Kubernetes 3.8_1 and updated docs
oscerd Mar 20, 2017
4b55f6a
Address review comments from @saad-ali
chakri-nelluri Mar 20, 2017
eda74e1
Move documentation to community 1.6
chakri-nelluri Mar 22, 2017
0e672ac
Remove unpaired '}'
liangxia Mar 23, 2017
df609f9
Merge pull request #42035 from timchenxiaoyu/enableerror
Mar 24, 2017
23cc2ce
Merge pull request #42564 from pierreozoux/patch-1
Mar 24, 2017
c7647dc
Merge pull request #42533 from yongtang/03042017-docs-typo
Mar 24, 2017
410665c
Merge pull request #41186 from dixudx/fix_percona_aptkey
Mar 24, 2017
fc07c8f
Merge pull request #42436 from vmware/add-stateful-set-example.kernel…
Mar 24, 2017
3a6a09c
Merge pull request #42170 from rootfs/azure-file-prv
Mar 25, 2017
71826e8
Merge pull request #41399 from NitishT/master
Mar 26, 2017
f7f1899
Merge pull request #43554 from liangxia/persistent-volume-provisionin…
Mar 27, 2017
35bc95c
VSAN policy support for storage volume provisioning inside kubernetes
BaluDontu Mar 27, 2017
31d575a
Merge pull request #42974 from vmware/VSANPolicyProvisioningForKubern…
Mar 28, 2017
0e98ab7
README updated
VivekBhat Mar 28, 2017
2722daf
chore (samples): Don't cache apks at all in Dockerfiles
SimenB Feb 8, 2017
ac152e6
relocate FC multipath readme to examples from pkg/volume
rootfs Mar 30, 2017
e1b227b
add eparis ass approver for test and examples
eparis Mar 30, 2017
26b9e3a
Merge pull request #42088 from ericchiang/psp-example-fix
Mar 30, 2017
75652aa
Merge pull request #43133 from oscerd/hazelcast-kube-3.8
Mar 31, 2017
5c3a824
Fix typo in mysql-galera example Dockerfile
koep Mar 31, 2017
0e65387
Fixed typos and issues in examples/volumes/glusterfs/README.md
metachris Mar 27, 2017
2bf6ddb
Add support for fstype in Storage Class for vSphere Cloud Provider
abrarshivani Feb 13, 2017
2c0afb9
Merge pull request #43861 from rootfs/fc-doc
Apr 5, 2017
c26dd6c
Merge pull request #42415 from timchenxiaoyu/satisfytypo
Apr 5, 2017
4854030
update iSCSI README with CHAP instruction
rootfs Mar 20, 2017
eb915a9
Merge pull request #43396 from rootfs/iscsi-chap
Apr 7, 2017
99cc7bf
fix typos and update an outdated reference in persistent-volume-provi…
Apr 13, 2017
4cca30b
Merge pull request #43183 from netroby/pr/wordpress-4.7.3
Apr 13, 2017
687b332
Merge pull request #44432 from harryge00/fix-typos
Apr 14, 2017
78bb2ba
autogenerated
mikedanese Apr 12, 2017
8c807fa
Remove deprecatedPublicIPs field
thockin Apr 15, 2017
215879a
Rearrange glusterfs artifacts to own directory.
humblec Apr 22, 2017
280ca62
Merge pull request #43703 from metachris/glusterfsReadmeUpdate
Apr 23, 2017
22b9dd4
Remove redis-proxy example
klausenbusk Apr 22, 2017
fd85735
Merge pull request #44801 from klausenbusk/patch-1
Apr 23, 2017
45cb952
README.md: Update outdated links
Apr 27, 2017
0966b44
Merge pull request #44804 from humblec/glusterfs-rearrange
Apr 27, 2017
494e9e8
Prune k8petstore from examples and e2es per discussion on sig-testing
timothysc Apr 27, 2017
4bb5338
Merge pull request #44988 from zhangxiaoyu-zidif/update-readme-links
May 1, 2017
ebc7105
Fix conflict in README after merge of unrelated histories
sebgoa May 1, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
78 changes: 78 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package(default_visibility = ["//visibility:public"])

licenses(["notice"])

load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)

filegroup(
name = "config",
srcs = glob([
"**/*.yaml",
"**/*.yml",
"**/*.json",
]) + [
"pod",
],
)

filegroup(
name = "sources",
srcs = glob([
"**/*",
]),
)

go_library(
name = "go_default_library",
srcs = ["doc.go"],
tags = ["automanaged"],
)

go_test(
name = "go_default_xtest",
srcs = ["examples_test.go"],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/api/testapi:go_default_library",
"//pkg/api/validation:go_default_library",
"//pkg/apis/apps:go_default_library",
"//pkg/apis/apps/validation:go_default_library",
"//pkg/apis/batch:go_default_library",
"//pkg/apis/extensions:go_default_library",
"//pkg/apis/extensions/validation:go_default_library",
"//pkg/capabilities:go_default_library",
"//pkg/registry/batch/job:go_default_library",
"//plugin/pkg/scheduler/api:go_default_library",
"//plugin/pkg/scheduler/api/latest:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/yaml:go_default_library",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//examples/explorer:all-srcs",
"//examples/guestbook-go:all-srcs",
"//examples/https-nginx:all-srcs",
"//examples/sharing-clusters:all-srcs",
],
tags = ["automanaged"],
)
9 changes: 9 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
reviewers:
- brendandburns
- thockin
- zmerlynn
approvers:
- brendandburns
- eparis
- thockin
- zmerlynn
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
# examples
Kubernetes application example tutorials
# Kubernetes Examples: releases.k8s.io/HEAD

Home for examples to be moved from kubernetes/kubernetes/examples
This directory contains a number of examples of how to run
real applications with Kubernetes.

Demonstrations of how to use specific Kubernetes features can be found in our [documents](../docs/).


### Maintained Examples

Maintained Examples are expected to be updated with every Kubernetes
release, to use the latest and greatest features, current guidelines
and best practices, and to refresh command syntax, output, changed
prerequisites, as needed.

|Name | Description | Notable Features Used | Complexity Level|
------------- | ------------- | ------------ | ------------ |
|[Guestbook](guestbook/) | PHP app with Redis | Replication Controller, Service | Beginner |
|[WordPress](mysql-wordpress-pd/) | WordPress with MySQL | Deployment, Persistent Volume with Claim | Beginner|
|[Cassandra](storage/cassandra/) | Cloud Native Cassandra | Daemon Set | Intermediate

* Note: Please add examples to the list above that are maintained.

See [Example Guidelines](guidelines.md) for a description of what goes
in this directory, and what examples should contain.

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/README.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
182 changes: 182 additions & 0 deletions cluster-dns/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
## Kubernetes DNS example

This is a toy example demonstrating how to use kubernetes DNS.

### Step Zero: Prerequisites

This example assumes that you have forked the repository and [turned up a Kubernetes cluster](../../docs/getting-started-guides/). Make sure DNS is enabled in your setup, see [DNS doc](https://github.com/kubernetes/dns).

```sh
$ cd kubernetes
$ hack/dev-build-and-up.sh
```

### Step One: Create two namespaces

We'll see how cluster DNS works across multiple [namespaces](../../docs/user-guide/namespaces.md), first we need to create two namespaces:

```sh
$ kubectl create -f examples/cluster-dns/namespace-dev.yaml
$ kubectl create -f examples/cluster-dns/namespace-prod.yaml
```

Now list all namespaces:

```sh
$ kubectl get namespaces
NAME LABELS STATUS
default <none> Active
development name=development Active
production name=production Active
```

For kubectl client to work with each namespace, we define two contexts:

```sh
$ kubectl config set-context dev --namespace=development --cluster=${CLUSTER_NAME} --user=${USER_NAME}
$ kubectl config set-context prod --namespace=production --cluster=${CLUSTER_NAME} --user=${USER_NAME}
```

You can view your cluster name and user name in kubernetes config at ~/.kube/config.

### Step Two: Create backend replication controller in each namespace

Use the file [`examples/cluster-dns/dns-backend-rc.yaml`](dns-backend-rc.yaml) to create a backend server [replication controller](../../docs/user-guide/replication-controller.md) in each namespace.

```sh
$ kubectl config use-context dev
$ kubectl create -f examples/cluster-dns/dns-backend-rc.yaml
```

Once that's up you can list the pod in the cluster:

```sh
$ kubectl get rc
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
dns-backend dns-backend ddysher/dns-backend name=dns-backend 1
```

Now repeat the above commands to create a replication controller in prod namespace:

```sh
$ kubectl config use-context prod
$ kubectl create -f examples/cluster-dns/dns-backend-rc.yaml
$ kubectl get rc
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
dns-backend dns-backend ddysher/dns-backend name=dns-backend 1
```

### Step Three: Create backend service

Use the file [`examples/cluster-dns/dns-backend-service.yaml`](dns-backend-service.yaml) to create
a [service](../../docs/user-guide/services.md) for the backend server.

```sh
$ kubectl config use-context dev
$ kubectl create -f examples/cluster-dns/dns-backend-service.yaml
```

Once that's up you can list the service in the cluster:

```sh
$ kubectl get service dns-backend
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE
dns-backend 10.0.2.3 <none> 8000/TCP name=dns-backend 1d
```

Again, repeat the same process for prod namespace:

```sh
$ kubectl config use-context prod
$ kubectl create -f examples/cluster-dns/dns-backend-service.yaml
$ kubectl get service dns-backend
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE
dns-backend 10.0.2.4 <none> 8000/TCP name=dns-backend 1d
```

### Step Four: Create client pod in one namespace

Use the file [`examples/cluster-dns/dns-frontend-pod.yaml`](dns-frontend-pod.yaml) to create a client [pod](../../docs/user-guide/pods.md) in dev namespace. The client pod will make a connection to backend and exit. Specifically, it tries to connect to address `http://dns-backend.development.cluster.local:8000`.

```sh
$ kubectl config use-context dev
$ kubectl create -f examples/cluster-dns/dns-frontend-pod.yaml
```

Once that's up you can list the pod in the cluster:

```sh
$ kubectl get pods dns-frontend
NAME READY STATUS RESTARTS AGE
dns-frontend 0/1 ExitCode:0 0 1m
```

Wait until the pod succeeds, then we can see the output from the client pod:

```sh
$ kubectl logs dns-frontend
2015-05-07T20:13:54.147664936Z 10.0.236.129
2015-05-07T20:13:54.147721290Z Send request to: http://dns-backend.development.cluster.local:8000
2015-05-07T20:13:54.147733438Z <Response [200]>
2015-05-07T20:13:54.147738295Z Hello World!
```

Please refer to the [source code](images/frontend/client.py) about the log. First line prints out the ip address associated with the service in dev namespace; remaining lines print out our request and server response.

If we switch to prod namespace with the same pod config, we'll see the same result, i.e. dns will resolve across namespace.

```sh
$ kubectl config use-context prod
$ kubectl create -f examples/cluster-dns/dns-frontend-pod.yaml
$ kubectl logs dns-frontend
2015-05-07T20:13:54.147664936Z 10.0.236.129
2015-05-07T20:13:54.147721290Z Send request to: http://dns-backend.development.cluster.local:8000
2015-05-07T20:13:54.147733438Z <Response [200]>
2015-05-07T20:13:54.147738295Z Hello World!
```


#### Note about default namespace

If you prefer not using namespace, then all your services can be addressed using `default` namespace, e.g. `http://dns-backend.default.svc.cluster.local:8000`, or shorthand version `http://dns-backend:8000`


### tl; dr;

For those of you who are impatient, here is the summary of the commands we ran in this tutorial. Remember to set first `$CLUSTER_NAME` and `$USER_NAME` to the values found in `~/.kube/config`.

```sh
# create dev and prod namespaces
kubectl create -f examples/cluster-dns/namespace-dev.yaml
kubectl create -f examples/cluster-dns/namespace-prod.yaml

# create two contexts
kubectl config set-context dev --namespace=development --cluster=${CLUSTER_NAME} --user=${USER_NAME}
kubectl config set-context prod --namespace=production --cluster=${CLUSTER_NAME} --user=${USER_NAME}

# create two backend replication controllers
kubectl config use-context dev
kubectl create -f examples/cluster-dns/dns-backend-rc.yaml
kubectl config use-context prod
kubectl create -f examples/cluster-dns/dns-backend-rc.yaml

# create backend services
kubectl config use-context dev
kubectl create -f examples/cluster-dns/dns-backend-service.yaml
kubectl config use-context prod
kubectl create -f examples/cluster-dns/dns-backend-service.yaml

# create a pod in each namespace and get its output
kubectl config use-context dev
kubectl create -f examples/cluster-dns/dns-frontend-pod.yaml
kubectl logs dns-frontend

kubectl config use-context prod
kubectl create -f examples/cluster-dns/dns-frontend-pod.yaml
kubectl logs dns-frontend
```


<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/cluster-dns/README.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
21 changes: 21 additions & 0 deletions cluster-dns/dns-backend-rc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: dns-backend
labels:
name: dns-backend
spec:
replicas: 1
selector:
name: dns-backend
template:
metadata:
labels:
name: dns-backend
spec:
containers:
- name: dns-backend
image: gcr.io/google_containers/example-dns-backend:v1
ports:
- name: backend-port
containerPort: 8000
9 changes: 9 additions & 0 deletions cluster-dns/dns-backend-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: Service
apiVersion: v1
metadata:
name: dns-backend
spec:
ports:
- port: 8000
selector:
name: dns-backend
16 changes: 16 additions & 0 deletions cluster-dns/dns-frontend-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Pod
metadata:
name: dns-frontend
labels:
name: dns-frontend
spec:
containers:
- name: dns-frontend
image: gcr.io/google_containers/example-dns-frontend:v1
command:
- python
- client.py
- http://dns-backend.development.cluster.local:8000
imagePullPolicy: Always
restartPolicy: Never
20 changes: 20 additions & 0 deletions cluster-dns/images/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2016 The Kubernetes Authors.
#
# 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.

FROM python:2.7-slim

COPY . /dns-backend
WORKDIR /dns-backend

CMD ["python", "server.py"]
Loading