├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── OWNERS
├── README.md
├── SECURITY.md
├── SECURITY_CONTACTS
├── _archived
├── cloud-controller-manager
│ └── persistent-volume-label-initializer-config.yaml
├── cluster-dns
│ ├── README.md
│ ├── dns-backend-rc.yaml
│ ├── dns-backend-service.yaml
│ ├── dns-frontend-pod.yaml
│ ├── images
│ │ ├── backend
│ │ │ ├── Dockerfile
│ │ │ ├── Makefile
│ │ │ └── server.py
│ │ └── frontend
│ │ │ ├── Dockerfile
│ │ │ ├── Makefile
│ │ │ └── client.py
│ ├── namespace-dev.yaml
│ └── namespace-prod.yaml
├── cockroachdb
│ ├── OWNERS
│ ├── README.md
│ ├── cockroachdb-statefulset.yaml
│ ├── demo.sh
│ └── minikube.sh
├── cpu-manager
│ ├── OWNERS
│ ├── README.md
│ ├── be.yaml
│ ├── exclusive-1.yaml
│ ├── exclusive-2.yaml
│ ├── exclusive-3.yaml
│ ├── exclusive-4.yaml
│ ├── pod-ips
│ └── shared.yaml
├── doc.go
├── elasticsearch
│ ├── README.md
│ ├── es-rc.yaml
│ ├── es-svc.yaml
│ ├── production_cluster
│ │ ├── README.md
│ │ ├── es-client-rc.yaml
│ │ ├── es-data-rc.yaml
│ │ ├── es-discovery-svc.yaml
│ │ ├── es-master-rc.yaml
│ │ ├── es-svc.yaml
│ │ └── service-account.yaml
│ ├── rbac.yaml
│ └── service-account.yaml
├── examples_test.go
├── explorer
│ ├── Dockerfile
│ ├── Makefile
│ ├── README.md
│ ├── explorer.go
│ └── pod.yaml
├── https-nginx
│ ├── Dockerfile
│ ├── Makefile
│ ├── README.md
│ ├── auto-reload-nginx.sh
│ ├── default.conf
│ ├── index2.html
│ ├── make_secret.go
│ └── nginx-app.yaml
├── javaee
│ ├── README.md
│ ├── mysql-pod.yaml
│ ├── mysql-service.yaml
│ └── wildfly-rc.yaml
├── javaweb-tomcat-sidecar
│ ├── README.md
│ ├── javaweb-2.yaml
│ ├── javaweb.yaml
│ └── workflow.png
├── job
│ ├── expansions
│ │ └── README.md
│ ├── work-queue-1
│ │ └── README.md
│ └── work-queue-2
│ │ └── README.md
├── meteor
│ ├── README.md
│ ├── dockerbase
│ │ ├── Dockerfile
│ │ └── README.md
│ ├── meteor-controller.json
│ ├── meteor-service.json
│ ├── mongo-pod.json
│ └── mongo-service.json
├── newrelic-infrastructure
│ ├── .gitignore
│ ├── README.md
│ ├── config-to-secret.sh
│ ├── newrelic-config-template.yaml
│ ├── newrelic-infra-daemonset.yaml
│ └── nrconfig.env
├── newrelic
│ ├── README.md
│ ├── config-to-secret.sh
│ ├── newrelic-config-template.yaml
│ ├── newrelic-config.yaml
│ ├── newrelic-daemonset.yaml
│ └── nrconfig.env
├── nodesjs-mongodb
│ ├── README.md
│ ├── mongo-controller.yaml
│ ├── mongo-service.yaml
│ ├── web-controller-demo.yaml
│ ├── web-controller.yaml
│ └── web-service.yaml
├── oms
│ └── README.md
├── openshift-origin
│ ├── .gitignore
│ ├── README.md
│ ├── cleanup.sh
│ ├── create.sh
│ ├── etcd-controller.yaml
│ ├── etcd-discovery-controller.yaml
│ ├── etcd-discovery-service.yaml
│ ├── etcd-service.yaml
│ ├── openshift-controller.yaml
│ ├── openshift-origin-namespace.yaml
│ ├── openshift-service.yaml
│ └── secret.json
├── persistent-volume-provisioning
│ ├── README.md
│ ├── aws-ebs.yaml
│ ├── cinder
│ │ ├── cinder-storage-class.yaml
│ │ └── example-pod.yaml
│ ├── claim1.json
│ ├── gce-pd.yaml
│ ├── glusterfs
│ │ ├── glusterfs-secret.yaml
│ │ └── glusterfs-storageclass.yaml
│ ├── quobyte
│ │ ├── example-pod.yaml
│ │ ├── quobyte-admin-secret.yaml
│ │ └── quobyte-storage-class.yaml
│ └── rbd
│ │ ├── ceph-secret-admin.yaml
│ │ ├── ceph-secret-user.yaml
│ │ ├── pod.yaml
│ │ └── rbd-storage-class.yaml
├── phabricator
│ ├── README.md
│ ├── phabricator-controller.json
│ ├── phabricator-service.json
│ ├── php-phabricator
│ │ ├── 000-default.conf
│ │ ├── Dockerfile
│ │ └── run.sh
│ ├── setup.sh
│ └── teardown.sh
├── pod
├── podsecuritypolicy
│ ├── OWNERS
│ └── rbac
│ │ ├── README.md
│ │ ├── bindings.yaml
│ │ ├── pod.yaml
│ │ ├── pod_priv.yaml
│ │ ├── policies.yaml
│ │ └── roles.yaml
├── runtime-constraints
│ └── README.md
├── scheduler-policy
│ ├── scheduler-policy-config-with-extender.json
│ └── scheduler-policy-config.json
├── selenium
│ ├── README.md
│ ├── selenium-hub-deployment.yaml
│ ├── selenium-hub-svc.yaml
│ ├── selenium-node-chrome-deployment.yaml
│ ├── selenium-node-firefox-deployment.yaml
│ └── selenium-test.py
├── sharing-clusters
│ ├── README.md
│ └── make_secret.go
├── simple-nginx.md
├── spark
│ ├── README.md
│ ├── namespace-spark-cluster.yaml
│ ├── spark-gluster
│ │ ├── README.md
│ │ ├── glusterfs-endpoints.yaml
│ │ ├── spark-master-controller.yaml
│ │ ├── spark-master-service.yaml
│ │ └── spark-worker-controller.yaml
│ ├── spark-master-controller.yaml
│ ├── spark-master-service.yaml
│ ├── spark-ui-proxy-controller.yaml
│ ├── spark-ui-proxy-service.yaml
│ ├── spark-worker-controller.yaml
│ ├── zeppelin-controller.yaml
│ └── zeppelin-service.yaml
├── storage
│ ├── hazelcast
│ │ ├── README.md
│ │ ├── hazelcast-deployment.yaml
│ │ └── hazelcast-service.yaml
│ ├── minio
│ │ ├── README.md
│ │ ├── minio-distributed-headless-service.yaml
│ │ ├── minio-distributed-service.yaml
│ │ ├── minio-distributed-statefulset.yaml
│ │ ├── minio-standalone-deployment.yaml
│ │ ├── minio-standalone-pvc.yaml
│ │ └── minio-standalone-service.yaml
│ ├── mysql-galera
│ │ ├── README.md
│ │ ├── image
│ │ │ ├── Dockerfile
│ │ │ ├── cluster.cnf
│ │ │ ├── docker-entrypoint.sh
│ │ │ └── my.cnf
│ │ ├── pxc-cluster-service.yaml
│ │ ├── pxc-node1.yaml
│ │ ├── pxc-node2.yaml
│ │ └── pxc-node3.yaml
│ ├── redis
│ │ ├── README.md
│ │ ├── image
│ │ │ ├── Dockerfile
│ │ │ ├── redis-master.conf
│ │ │ ├── redis-slave.conf
│ │ │ └── run.sh
│ │ ├── redis-controller.yaml
│ │ ├── redis-master.yaml
│ │ ├── redis-sentinel-controller.yaml
│ │ └── redis-sentinel-service.yaml
│ ├── rethinkdb
│ │ ├── README.md
│ │ ├── admin-pod.yaml
│ │ ├── admin-service.yaml
│ │ ├── driver-service.yaml
│ │ ├── gen-pod.sh
│ │ ├── image
│ │ │ ├── Dockerfile
│ │ │ └── run.sh
│ │ └── rc.yaml
│ └── vitess
│ │ ├── README.md
│ │ ├── configure.sh
│ │ ├── create_test_table.sql
│ │ ├── env.sh
│ │ ├── etcd-controller-template.yaml
│ │ ├── etcd-down.sh
│ │ ├── etcd-service-template.yaml
│ │ ├── etcd-up.sh
│ │ ├── guestbook-controller.yaml
│ │ ├── guestbook-down.sh
│ │ ├── guestbook-service.yaml
│ │ ├── guestbook-up.sh
│ │ ├── vitess-down.sh
│ │ ├── vitess-up.sh
│ │ ├── vtctld-controller-template.yaml
│ │ ├── vtctld-down.sh
│ │ ├── vtctld-service.yaml
│ │ ├── vtctld-up.sh
│ │ ├── vtgate-controller-template.yaml
│ │ ├── vtgate-down.sh
│ │ ├── vtgate-service.yaml
│ │ ├── vtgate-up.sh
│ │ ├── vttablet-down.sh
│ │ ├── vttablet-pod-template.yaml
│ │ └── vttablet-up.sh
├── storm
│ ├── README.md
│ ├── storm-nimbus-service.json
│ ├── storm-nimbus.json
│ ├── storm-worker-controller.yaml
│ ├── zookeeper-service.json
│ └── zookeeper.json
├── sysdig-cloud
│ ├── README.md
│ ├── sysdig-daemonset.yaml
│ └── sysdig-rc.yaml
└── volumes
│ ├── aws_ebs
│ ├── README.md
│ └── aws-ebs-web.yaml
│ ├── azure_disk
│ ├── README.md
│ ├── azure.yaml
│ ├── claim
│ │ ├── README.md
│ │ ├── blob-based-disk
│ │ │ ├── account-specified-hdd
│ │ │ │ ├── pod-uses-account-hdd.yaml
│ │ │ │ ├── pvc-on-account-hdd.yaml
│ │ │ │ └── storageclass-account-hdd.yaml
│ │ │ ├── dedicated-hdd
│ │ │ │ ├── pod-uses-dedicated-hdd.yaml
│ │ │ │ ├── pvc-on-dedicated-hdd.yaml
│ │ │ │ └── storageclass-dedicated-hdd.yaml
│ │ │ ├── shared-hdd
│ │ │ │ ├── pod-uses-shared-hdd.yaml
│ │ │ │ ├── pvc-on-shared-hdd.yaml
│ │ │ │ └── storageclass-shared-hdd.yaml
│ │ │ └── shared-ssd
│ │ │ │ ├── pod-uses-shared-ssd.yaml
│ │ │ │ ├── pvc-on-shared-ssd.yaml
│ │ │ │ └── storageclass-shared-ssd.yaml
│ │ └── managed-disk
│ │ │ ├── managed-hdd
│ │ │ ├── pod-uses-managed-hdd.yaml
│ │ │ ├── pvc-on-managed-hdd.yaml
│ │ │ └── storageclass-managed-hdd.yaml
│ │ │ └── managed-ssd
│ │ │ ├── pod-uses-managed-ssd.yaml
│ │ │ ├── pvc-on-managed-ssd.yaml
│ │ │ └── storageclass-managed-ssd.yaml
│ └── static-provisioning
│ │ └── managed-disk
│ │ └── pod-uses-existing-managed-disk.yaml
│ ├── azure_file
│ ├── README.md
│ ├── azure-2.yaml
│ ├── azure-pv.yaml
│ ├── azure-pvc.yaml
│ ├── azure.yaml
│ └── secret
│ │ └── azure-secret.yaml
│ ├── cephfs
│ ├── README.md
│ ├── cephfs-with-secret.yaml
│ ├── cephfs.yaml
│ └── secret
│ │ └── ceph-secret.yaml
│ ├── cinder
│ ├── README.md
│ └── cinder-web.yaml
│ ├── fibre_channel
│ ├── README.md
│ └── fc.yaml
│ ├── flexvolume
│ ├── README.md
│ ├── deploy
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── deploy.sh
│ │ └── ds.yaml
│ ├── dummy
│ ├── dummy-attachable
│ ├── lvm
│ ├── nfs
│ ├── nginx-dummy-attachable.yaml
│ ├── nginx-dummy.yaml
│ ├── nginx-lvm.yaml
│ ├── nginx-nfs.yaml
│ └── nginx.yaml
│ ├── flocker
│ ├── README.md
│ ├── flocker-pod-with-rc.yml
│ └── flocker-pod.yml
│ ├── glusterfs
│ ├── README.md
│ ├── glusterfs-endpoints.yaml
│ ├── glusterfs-pod.yaml
│ └── glusterfs-service.yaml
│ ├── iscsi
│ ├── README.md
│ ├── chap-secret.yaml
│ ├── iscsi-chap.yaml
│ └── iscsi.yaml
│ ├── nfs
│ ├── README.md
│ ├── nfs-busybox-deployment.yaml
│ ├── nfs-data
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── index.html
│ │ └── run_nfs.sh
│ ├── nfs-pv.png
│ ├── nfs-pv.yaml
│ ├── nfs-pvc.yaml
│ ├── nfs-server-deployment.yaml
│ ├── nfs-server-service.yaml
│ ├── nfs-web-deployment.yaml
│ ├── nfs-web-service.yaml
│ └── provisioner
│ │ ├── nfs-server-azure-pv.yaml
│ │ ├── nfs-server-cdk-pv.yaml
│ │ └── nfs-server-gce-pv.yaml
│ ├── portworx
│ ├── README.md
│ ├── portworx-volume-pod.yaml
│ ├── portworx-volume-pv.yaml
│ ├── portworx-volume-pvc.yaml
│ ├── portworx-volume-pvcpod.yaml
│ ├── portworx-volume-pvcsc.yaml
│ ├── portworx-volume-pvcscpod.yaml
│ └── portworx-volume-sc-high.yaml
│ ├── quobyte
│ ├── Readme.md
│ └── quobyte-pod.yaml
│ ├── rbd
│ ├── README.md
│ ├── rbd-with-secret.yaml
│ ├── rbd.yaml
│ └── secret
│ │ └── ceph-secret.yaml
│ ├── scaleio
│ ├── README.md
│ ├── pod-sc-pvc.yaml
│ ├── pod.yaml
│ ├── sc-pvc.yaml
│ ├── sc.yaml
│ └── secret.yaml
│ ├── storageos
│ ├── README.md
│ ├── storageos-pod.yaml
│ ├── storageos-pv.yaml
│ ├── storageos-pvc.yaml
│ ├── storageos-pvcpod.yaml
│ ├── storageos-sc-pvc.yaml
│ ├── storageos-sc-pvcpod.yaml
│ ├── storageos-sc.yaml
│ └── storageos-secret.yaml
│ └── vsphere
│ ├── README.md
│ ├── deployment.yaml
│ ├── simple-statefulset.yaml
│ ├── simple-storageclass.yaml
│ ├── vsphere-volume-pod.yaml
│ ├── vsphere-volume-pv.yaml
│ ├── vsphere-volume-pvc.yaml
│ ├── vsphere-volume-pvcpod.yaml
│ ├── vsphere-volume-pvcsc.yaml
│ ├── vsphere-volume-pvcscpod.yaml
│ ├── vsphere-volume-pvcscvsanpod.yaml
│ ├── vsphere-volume-sc-fast.yaml
│ ├── vsphere-volume-sc-vsancapabilities-with-datastore.yaml
│ ├── vsphere-volume-sc-vsancapabilities.yaml
│ ├── vsphere-volume-sc-with-datastore.yaml
│ ├── vsphere-volume-spbm-policy-with-datastore.yaml
│ └── vsphere-volume-spbm-policy.yaml
├── ai
└── README.md
├── cassandra
├── Makefile
├── OWNERS
├── README.md
├── cassandra-service.yaml
├── cassandra-statefulset.yaml
├── go
│ └── main.go
├── image
│ ├── Dockerfile
│ └── files
│ │ ├── build.sh
│ │ ├── cassandra-seed.h
│ │ ├── cassandra.yaml
│ │ ├── jvm.options
│ │ ├── kubernetes-cassandra.jar
│ │ ├── logback.xml
│ │ ├── ready-probe.sh
│ │ └── run.sh
└── java
│ ├── .gitignore
│ ├── README.md
│ ├── pom.xml
│ └── src
│ ├── main
│ └── java
│ │ └── io
│ │ └── k8s
│ │ └── cassandra
│ │ ├── GoInterface.java
│ │ └── KubernetesSeedProvider.java
│ └── test
│ ├── java
│ └── io
│ │ └── k8s
│ │ └── cassandra
│ │ └── KubernetesSeedProviderTest.java
│ └── resources
│ ├── cassandra.yaml
│ └── logback-test.xml
├── code-of-conduct.md
├── guestbook-go
├── .gitignore
├── Dockerfile
├── Makefile
├── README.md
├── guestbook-controller.yaml
├── guestbook-page.png
├── guestbook-service.yaml
├── main.go
├── public
│ ├── index.html
│ ├── script.js
│ └── style.css
├── redis-master-controller.yaml
├── redis-master-service.yaml
├── redis-replica-controller.yaml
└── redis-replica-service.yaml
├── guestbook
├── MAINTENANCE.md
├── README.md
├── all-in-one
│ ├── frontend.yaml
│ ├── guestbook-all-in-one.yaml
│ └── redis-replica.yaml
├── frontend-deployment.yaml
├── frontend-service.yaml
├── legacy
│ ├── frontend-controller.yaml
│ ├── redis-master-controller.yaml
│ └── redis-replica-controller.yaml
├── php-redis
│ ├── Dockerfile
│ ├── Makefile
│ ├── controllers.js
│ ├── guestbook.php
│ └── index.html
├── redis-master-deployment.yaml
├── redis-master-service.yaml
├── redis-replica-deployment.yaml
├── redis-replica-service.yaml
└── redis-slave
│ ├── Dockerfile
│ ├── Makefile
│ └── run.sh
├── guidelines.md
└── mysql-cinder-pd
├── README.md
├── mysql-service.yaml
└── mysql.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX leaves these everywhere on SMB shares
2 | ._*
3 |
4 | # OSX trash
5 | .DS_Store
6 |
7 | # Eclipse files
8 | .classpath
9 | .project
10 | .settings/**
11 |
12 | # Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
13 | .idea/
14 | *.iml
15 |
16 | # Vscode files
17 | .vscode
18 |
19 | # Emacs save files
20 | *~
21 | \#*\#
22 | .\#*
23 |
24 | # Vim-related files
25 | [._]*.s[a-w][a-z]
26 | [._]s[a-w][a-z]
27 | *.un~
28 | Session.vim
29 | .netrwhist
30 |
31 | # cscope-related files
32 | cscope.*
33 |
34 | # JUnit test output from ginkgo e2e tests
35 | /junit*.xml
36 |
37 | # Mercurial files
38 | **/.hg
39 | **/.hg*
40 |
41 |
42 | .tags*
43 |
44 | /bazel-*
45 | *.pyc
46 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Thanks for taking the time to join our community and start contributing!
4 |
5 | The [Contributor Guide](https://github.com/kubernetes/community/blob/master/contributors/guide/README.md)
6 | provides detailed instructions on how to get your ideas and bug fixes seen and accepted.
7 |
8 | Please remember to sign the [CNCF CLA](https://github.com/kubernetes/community/blob/master/CLA.md) and
9 | read and observe the [Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
10 |
--------------------------------------------------------------------------------
/OWNERS:
--------------------------------------------------------------------------------
1 | # See the OWNERS docs at https://go.k8s.io/owners
2 |
3 | reviewers:
4 | - idvoretskyi
5 | - janetkuo
6 | - kow3ns
7 | - sebgoa
8 | - soltysh
9 | approvers:
10 | - idvoretskyi
11 | - janetkuo
12 | - kow3ns
13 | - sebgoa
14 | - soltysh
15 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Security Announcements
4 |
5 | Join the [kubernetes-security-announce] group for security and vulnerability announcements.
6 |
7 | You can also subscribe to an RSS feed of the above using [this link][kubernetes-security-announce-rss].
8 |
9 | ## Reporting a Vulnerability
10 |
11 | Instructions for reporting a vulnerability can be found on the
12 | [Kubernetes Security and Disclosure Information] page.
13 |
14 | ## Supported Versions
15 |
16 | Information about supported Kubernetes versions can be found on the
17 | [Kubernetes version and version skew support policy] page on the Kubernetes website.
18 |
19 | [kubernetes-security-announce]: https://groups.google.com/forum/#!forum/kubernetes-security-announce
20 | [kubernetes-security-announce-rss]: https://groups.google.com/forum/feed/kubernetes-security-announce/msgs/rss_v2_0.xml?num=50
21 | [Kubernetes version and version skew support policy]: https://kubernetes.io/docs/setup/release/version-skew-policy/#supported-versions
22 | [Kubernetes Security and Disclosure Information]: https://kubernetes.io/docs/reference/issues-security/security/#report-a-vulnerability
23 |
--------------------------------------------------------------------------------
/SECURITY_CONTACTS:
--------------------------------------------------------------------------------
1 | # Defined below are the security contacts for this repo.
2 | #
3 | # They are the contact point for the Product Security Committee to reach out
4 | # to for triaging and handling of incoming issues.
5 | #
6 | # The below names agree to abide by the
7 | # [Embargo
8 | # Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy)
9 | # and will be removed and replaced if they violate that agreement.
10 | #
11 | # DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
12 | # INSTRUCTIONS AT https://kubernetes.io/security/
13 |
14 | janetkuo
15 | kow3ns
16 | soltysh
17 |
--------------------------------------------------------------------------------
/_archived/cloud-controller-manager/persistent-volume-label-initializer-config.yaml:
--------------------------------------------------------------------------------
1 | kind: InitializerConfiguration
2 | apiVersion: admissionregistration.k8s.io/v1alpha1
3 | metadata:
4 | name: pvlabel.kubernetes.io
5 | initializers:
6 | - name: pvlabel.kubernetes.io
7 | rules:
8 | - apiGroups:
9 | - ""
10 | apiVersions:
11 | - "*"
12 | resources:
13 | - persistentvolumes
14 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/dns-backend-rc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: dns-backend
5 | labels:
6 | name: dns-backend
7 | spec:
8 | replicas: 1
9 | selector:
10 | name: dns-backend
11 | template:
12 | metadata:
13 | labels:
14 | name: dns-backend
15 | spec:
16 | containers:
17 | - name: dns-backend
18 | image: registry.k8s.io/example-dns-backend:v2
19 | ports:
20 | - name: backend-port
21 | containerPort: 8000
22 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/dns-backend-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: dns-backend
5 | spec:
6 | ports:
7 | - port: 8000
8 | selector:
9 | name: dns-backend
10 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/dns-frontend-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: dns-frontend
5 | labels:
6 | name: dns-frontend
7 | spec:
8 | containers:
9 | - name: dns-frontend
10 | image: registry.k8s.io/example-dns-frontend:v1
11 | command:
12 | - python
13 | - client.py
14 | - http://dns-backend.development.svc.cluster.local:8000
15 | imagePullPolicy: Always
16 | restartPolicy: Never
17 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/images/backend/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM python:3-slim
16 |
17 | COPY . /dns-backend
18 | WORKDIR /dns-backend
19 |
20 | CMD ["python", "server.py"]
21 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/images/backend/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | TAG = v2
16 | PREFIX = staging-k8s.gcr.io
17 | IMAGE = example-dns-backend
18 |
19 | all: push
20 |
21 | image:
22 | docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .
23 |
24 | push: image
25 | gcloud docker -- push $(PREFIX)/$(IMAGE)
26 |
27 | clean:
28 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/images/backend/server.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | from http.server import BaseHTTPRequestHandler,HTTPServer
18 |
19 | PORT_NUMBER = 8000
20 |
21 | # This class will handles any incoming request.
22 | class HTTPHandler(BaseHTTPRequestHandler):
23 | # Handler for the GET requests
24 | def do_GET(self):
25 | self.send_response(200)
26 | self.send_header('Content-type','text/html')
27 | self.end_headers()
28 | self.wfile.write(b"Hello World!")
29 |
30 | try:
31 | # Create a web server and define the handler to manage the incoming request.
32 | server = HTTPServer(('', PORT_NUMBER), HTTPHandler)
33 | print('Started httpserver on port ', PORT_NUMBER)
34 | server.serve_forever()
35 | except KeyboardInterrupt:
36 | print('^C received, shutting down the web server')
37 | server.socket.close()
38 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/images/frontend/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM python:2.7-slim
16 |
17 | RUN pip install requests
18 |
19 | COPY . /dns-frontend
20 | WORKDIR /dns-frontend
21 |
22 | CMD ["python", "client.py"]
23 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/images/frontend/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | TAG = v1
16 | PREFIX = staging-k8s.gcr.io
17 | IMAGE = example-dns-frontend
18 |
19 | all: push
20 |
21 | image:
22 | docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .
23 |
24 | push: image
25 | gcloud docker -- push $(PREFIX)/$(IMAGE)
26 |
27 | clean:
28 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/images/frontend/client.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | import argparse
18 | import requests
19 | import socket
20 | import sys
21 |
22 | if sys.version_info[0] < 3:
23 | from urlparse import urlparse
24 | else:
25 | from urllib.parse import urlparse
26 |
27 |
28 | def CheckServiceAddress(address):
29 | hostname = urlparse(address).hostname
30 | service_address = socket.gethostbyname(hostname)
31 | print(service_address)
32 |
33 |
34 | def GetServerResponse(address):
35 | print('Send request to:', address)
36 | response = requests.get(address)
37 | print(response)
38 | print(response.content)
39 |
40 |
41 | def Main():
42 | parser = argparse.ArgumentParser()
43 | parser.add_argument('address')
44 | args = parser.parse_args()
45 | CheckServiceAddress(args.address)
46 | GetServerResponse(args.address)
47 |
48 |
49 | if __name__ == "__main__":
50 | Main()
51 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/namespace-dev.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Namespace
3 | metadata:
4 | name: "development"
5 | labels:
6 | name: "development"
7 |
--------------------------------------------------------------------------------
/_archived/cluster-dns/namespace-prod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Namespace
3 | metadata:
4 | name: "production"
5 | labels:
6 | name: "production"
7 |
--------------------------------------------------------------------------------
/_archived/cockroachdb/OWNERS:
--------------------------------------------------------------------------------
1 | # See the OWNERS docs at https://go.k8s.io/owners
2 |
3 | reviewers:
4 | - a-robinson
5 | approvers:
6 | - a-robinson
7 |
--------------------------------------------------------------------------------
/_archived/cpu-manager/OWNERS:
--------------------------------------------------------------------------------
1 | # See the OWNERS docs at https://go.k8s.io/owners
2 |
3 | approvers:
4 | - derekwaynecarr
5 | - vishh
6 | - ConnorDoyle
7 | - sjenning
8 | emeritus_approvers:
9 | - balajismaniam
10 |
--------------------------------------------------------------------------------
/_archived/cpu-manager/be.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: be
5 | spec:
6 | containers:
7 | - image: quay.io/connordoyle/cpuset-visualizer
8 | name: be
9 |
--------------------------------------------------------------------------------
/_archived/cpu-manager/exclusive-1.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: exclusive-1
5 | spec:
6 | containers:
7 | - image: quay.io/connordoyle/cpuset-visualizer
8 | name: exclusive-1
9 | resources:
10 | requests:
11 | cpu: 1
12 | memory: "256M"
13 | limits:
14 | cpu: 1
15 | memory: "256M"
16 |
--------------------------------------------------------------------------------
/_archived/cpu-manager/exclusive-2.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: exclusive-2
5 | spec:
6 | containers:
7 | - image: quay.io/connordoyle/cpuset-visualizer
8 | name: exclusive-2
9 | resources:
10 | requests:
11 | cpu: 2
12 | memory: "256M"
13 | limits:
14 | cpu: 2
15 | memory: "256M"
16 |
--------------------------------------------------------------------------------
/_archived/cpu-manager/exclusive-3.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: exclusive-3
5 | spec:
6 | containers:
7 | - image: quay.io/connordoyle/cpuset-visualizer
8 | name: exclusive-3
9 | resources:
10 | requests:
11 | cpu: 3
12 | memory: "256M"
13 | limits:
14 | cpu: 3
15 | memory: "256M"
16 |
--------------------------------------------------------------------------------
/_archived/cpu-manager/exclusive-4.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: exclusive-4
5 | spec:
6 | containers:
7 | - image: quay.io/connordoyle/cpuset-visualizer
8 | name: exclusive-4
9 | resources:
10 | requests:
11 | cpu: 4
12 | memory: "256M"
13 | limits:
14 | cpu: 4
15 | memory: "256M"
16 |
--------------------------------------------------------------------------------
/_archived/cpu-manager/pod-ips:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2017 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Requires `jq`. See https://stedolan.github.io/jq/download
18 |
19 | set -o nounset -o pipefail -o errexit
20 |
21 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
22 | KUBECTL="$DIR/../../cluster/kubectl.sh"
23 | export KUBECONFIG="${KUBECONFIG:-/var/run/kubernetes/admin.kubeconfig}"
24 |
25 | $KUBECTL get pods -o json | \
26 | jq -r '.items[] | "\(.metadata.name) http://\(.status.podIP)"'
27 |
--------------------------------------------------------------------------------
/_archived/cpu-manager/shared.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: shared
5 | spec:
6 | containers:
7 | - image: quay.io/connordoyle/cpuset-visualizer
8 | name: shared
9 | resources:
10 | requests:
11 | cpu: 100m
12 |
--------------------------------------------------------------------------------
/_archived/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2014 The Kubernetes Authors.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | // Examples contains sample applications for trying out the concepts in Kubernetes.
18 | package examples // import "k8s.io/kubernetes/examples"
19 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/es-svc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: elasticsearch
5 | labels:
6 | component: elasticsearch
7 | spec:
8 | type: LoadBalancer
9 | selector:
10 | component: elasticsearch
11 | ports:
12 | - name: http
13 | port: 9200
14 | protocol: TCP
15 | - name: transport
16 | port: 9300
17 | protocol: TCP
18 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/production_cluster/es-client-rc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: es-client
5 | labels:
6 | component: elasticsearch
7 | role: client
8 | spec:
9 | replicas: 1
10 | template:
11 | metadata:
12 | labels:
13 | component: elasticsearch
14 | role: client
15 | spec:
16 | serviceAccount: elasticsearch
17 | containers:
18 | - name: es-client
19 | securityContext:
20 | capabilities:
21 | add:
22 | - IPC_LOCK
23 | image: quay.io/pires/docker-elasticsearch-kubernetes:1.7.1-4
24 | env:
25 | - name: KUBERNETES_CA_CERTIFICATE_FILE
26 | value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
27 | - name: NAMESPACE
28 | valueFrom:
29 | fieldRef:
30 | fieldPath: metadata.namespace
31 | - name: "CLUSTER_NAME"
32 | value: "myesdb"
33 | - name: NODE_MASTER
34 | value: "false"
35 | - name: NODE_DATA
36 | value: "false"
37 | - name: HTTP_ENABLE
38 | value: "true"
39 | ports:
40 | - containerPort: 9200
41 | name: http
42 | protocol: TCP
43 | - containerPort: 9300
44 | name: transport
45 | protocol: TCP
46 | volumeMounts:
47 | - mountPath: /data
48 | name: storage
49 | volumes:
50 | - name: storage
51 | emptyDir: {}
52 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/production_cluster/es-data-rc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: es-data
5 | labels:
6 | component: elasticsearch
7 | role: data
8 | spec:
9 | replicas: 1
10 | template:
11 | metadata:
12 | labels:
13 | component: elasticsearch
14 | role: data
15 | spec:
16 | serviceAccount: elasticsearch
17 | containers:
18 | - name: es-data
19 | securityContext:
20 | capabilities:
21 | add:
22 | - IPC_LOCK
23 | image: quay.io/pires/docker-elasticsearch-kubernetes:1.7.1-4
24 | env:
25 | - name: KUBERNETES_CA_CERTIFICATE_FILE
26 | value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
27 | - name: NAMESPACE
28 | valueFrom:
29 | fieldRef:
30 | fieldPath: metadata.namespace
31 | - name: "CLUSTER_NAME"
32 | value: "myesdb"
33 | - name: NODE_MASTER
34 | value: "false"
35 | - name: HTTP_ENABLE
36 | value: "false"
37 | ports:
38 | - containerPort: 9300
39 | name: transport
40 | protocol: TCP
41 | volumeMounts:
42 | - mountPath: /data
43 | name: storage
44 | volumes:
45 | - name: storage
46 | emptyDir: {}
47 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/production_cluster/es-discovery-svc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: elasticsearch-discovery
5 | labels:
6 | component: elasticsearch
7 | role: master
8 | spec:
9 | selector:
10 | component: elasticsearch
11 | role: master
12 | ports:
13 | - name: transport
14 | port: 9300
15 | protocol: TCP
16 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/production_cluster/es-master-rc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: es-master
5 | labels:
6 | component: elasticsearch
7 | role: master
8 | spec:
9 | replicas: 1
10 | template:
11 | metadata:
12 | labels:
13 | component: elasticsearch
14 | role: master
15 | spec:
16 | serviceAccount: elasticsearch
17 | containers:
18 | - name: es-master
19 | securityContext:
20 | capabilities:
21 | add:
22 | - IPC_LOCK
23 | image: quay.io/pires/docker-elasticsearch-kubernetes:1.7.1-4
24 | env:
25 | - name: KUBERNETES_CA_CERTIFICATE_FILE
26 | value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
27 | - name: NAMESPACE
28 | valueFrom:
29 | fieldRef:
30 | fieldPath: metadata.namespace
31 | - name: "CLUSTER_NAME"
32 | value: "myesdb"
33 | - name: NODE_MASTER
34 | value: "true"
35 | - name: NODE_DATA
36 | value: "false"
37 | - name: HTTP_ENABLE
38 | value: "false"
39 | ports:
40 | - containerPort: 9300
41 | name: transport
42 | protocol: TCP
43 | volumeMounts:
44 | - mountPath: /data
45 | name: storage
46 | volumes:
47 | - name: storage
48 | emptyDir: {}
49 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/production_cluster/es-svc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: elasticsearch
5 | labels:
6 | component: elasticsearch
7 | role: client
8 | spec:
9 | type: LoadBalancer
10 | selector:
11 | component: elasticsearch
12 | role: client
13 | ports:
14 | - name: http
15 | port: 9200
16 | protocol: TCP
17 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/production_cluster/service-account.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ServiceAccount
3 | metadata:
4 | name: elasticsearch
5 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/rbac.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: Role
4 | metadata:
5 | name: elasticsearch
6 | rules:
7 | - apiGroups:
8 | - ""
9 | resources:
10 | - endpoints
11 | verbs:
12 | - get
13 | ---
14 | apiVersion: rbac.authorization.k8s.io/v1
15 | kind: RoleBinding
16 | metadata:
17 | name: elasticsearch
18 | roleRef:
19 | apiGroup: rbac.authorization.k8s.io
20 | kind: Role
21 | name: elasticsearch
22 | subjects:
23 | - kind: ServiceAccount
24 | name: elasticsearch
25 | namespace: default
26 |
--------------------------------------------------------------------------------
/_archived/elasticsearch/service-account.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ServiceAccount
3 | metadata:
4 | name: elasticsearch
5 |
--------------------------------------------------------------------------------
/_archived/explorer/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM scratch
16 | ADD explorer explorer
17 | ADD README.md README.md
18 | EXPOSE 8080
19 | ENTRYPOINT ["/explorer"]
20 |
--------------------------------------------------------------------------------
/_archived/explorer/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | all: push
16 |
17 | # Keep this one version ahead, so no one accidentally blows away the latest published version.
18 | TAG = 1.1
19 |
20 | explorer: explorer.go
21 | CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./explorer.go
22 |
23 | container: explorer
24 | docker build --pull -t staging-k8s.gcr.io/explorer:$(TAG) .
25 |
26 | push: container
27 | gcloud docker -- push staging-k8s.gcr.io/explorer:$(TAG)
28 |
29 | clean:
30 | rm -f explorer
31 |
--------------------------------------------------------------------------------
/_archived/explorer/pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: explorer
5 | spec:
6 | containers:
7 | - name: explorer
8 | image: registry.k8s.io/explorer:1.0
9 | args: ["-port=8080"]
10 | ports:
11 | - containerPort: 8080
12 | protocol: TCP
13 | volumeMounts:
14 | - mountPath: "/mount/test-volume"
15 | name: test-volume
16 | volumes:
17 | - name: test-volume
18 | emptyDir: {}
19 |
--------------------------------------------------------------------------------
/_archived/https-nginx/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM nginx
16 |
17 |
18 | COPY index2.html /usr/share/nginx/html/index2.html
19 | RUN chmod +r /usr/share/nginx/html/index2.html
20 | COPY auto-reload-nginx.sh /home/auto-reload-nginx.sh
21 | RUN chmod +x /home/auto-reload-nginx.sh
22 |
23 | # install inotify
24 | RUN apt-get update && apt-get install -y inotify-tools
25 |
--------------------------------------------------------------------------------
/_archived/https-nginx/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | all:
16 |
17 | TAG = 1.0
18 | PREFIX = bprashanth/nginxhttps
19 | KEY = /tmp/nginx.key
20 | CERT = /tmp/nginx.crt
21 | SECRET = /tmp/secret.json
22 |
23 | keys:
24 | # The CName used here is specific to the service specified in nginx-app.yaml.
25 | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $(KEY) -out $(CERT) -subj "/CN=nginxsvc/O=nginxsvc"
26 |
27 | container:
28 | docker build --pull -t $(PREFIX):$(TAG) .
29 |
30 | push: container
31 | docker push $(PREFIX):$(TAG)
32 |
33 | clean:
34 | rm $(KEY)
35 | rm $(CERT)
36 |
--------------------------------------------------------------------------------
/_archived/https-nginx/auto-reload-nginx.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright 2016 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | nginx "$@"
18 | oldcksum=`cksum /etc/nginx/conf.d/default.conf`
19 |
20 | inotifywait -e modify,move,create,delete -mr --timefmt '%d/%m/%y %H:%M' --format '%T' \
21 | /etc/nginx/conf.d/ | while read date time; do
22 |
23 | newcksum=`cksum /etc/nginx/conf.d/default.conf`
24 | if [ "$newcksum" != "$oldcksum" ]; then
25 | echo "At ${time} on ${date}, config file update detected."
26 | oldcksum=$newcksum
27 | nginx -s reload
28 | fi
29 |
30 | done
31 |
--------------------------------------------------------------------------------
/_archived/https-nginx/default.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80 default_server;
3 | listen [::]:80 default_server ipv6only=on;
4 |
5 | listen 443 ssl;
6 |
7 | root /usr/share/nginx/html;
8 | index index.html;
9 |
10 | server_name localhost;
11 | ssl_certificate /etc/nginx/ssl/tls.crt;
12 | ssl_certificate_key /etc/nginx/ssl/tls.key;
13 |
14 | location / {
15 | try_files $uri $uri/ =404;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/_archived/https-nginx/index2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Nginx reloaded!
5 |
12 |
13 |
14 | Nginx has been reloaded!
15 | If you see this page, the nginx web server has been automatically reloaded, since the config file has been updated using Kubernetes.
16 |
17 |
18 | For online documentation and support please refer to
19 | kubernetes.io.
20 |
21 | For online documentation and support please refer to
22 | nginx.org.
23 | Commercial support is available at
24 | nginx.com.
25 |
26 | Thank you for using nginx.
27 |
28 |
29 |
--------------------------------------------------------------------------------
/_archived/https-nginx/nginx-app.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: nginxsvc
5 | labels:
6 | app: nginx
7 | spec:
8 | type: NodePort
9 | ports:
10 | - port: 80
11 | protocol: TCP
12 | name: http
13 | - port: 443
14 | protocol: TCP
15 | name: https
16 | selector:
17 | app: nginx
18 | ---
19 | apiVersion: v1
20 | kind: ReplicationController
21 | metadata:
22 | name: my-nginx
23 | spec:
24 | replicas: 1
25 | template:
26 | metadata:
27 | labels:
28 | app: nginx
29 | spec:
30 | volumes:
31 | - name: secret-volume
32 | secret:
33 | secretName: nginxsecret
34 | - name: configmap-volume
35 | configMap:
36 | name: nginxconfigmap
37 | containers:
38 | - name: nginxhttps
39 | image: ymqytw/nginxhttps:1.5
40 | command: ["/home/auto-reload-nginx.sh"]
41 | ports:
42 | - containerPort: 443
43 | - containerPort: 80
44 | livenessProbe:
45 | httpGet:
46 | path: /index.html
47 | port: 80
48 | initialDelaySeconds: 30
49 | timeoutSeconds: 1
50 | volumeMounts:
51 | - mountPath: /etc/nginx/ssl
52 | name: secret-volume
53 | - mountPath: /etc/nginx/conf.d
54 | name: configmap-volume
55 |
--------------------------------------------------------------------------------
/_archived/javaee/mysql-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: mysql-pod
5 | labels:
6 | name: mysql-pod
7 | context: docker-k8s-lab
8 | spec:
9 | containers:
10 | - name: mysql
11 | image: mysql:latest
12 | env:
13 | - name: "MYSQL_USER"
14 | value: "mysql"
15 | - name: "MYSQL_PASSWORD"
16 | value: "mysql"
17 | - name: "MYSQL_DATABASE"
18 | value: "sample"
19 | - name: "MYSQL_ROOT_PASSWORD"
20 | value: "supersecret"
21 | ports:
22 | - containerPort: 3306
23 |
--------------------------------------------------------------------------------
/_archived/javaee/mysql-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: mysql-service
5 | labels:
6 | name: mysql-pod
7 | context: docker-k8s-lab
8 | spec:
9 | ports:
10 | # the port that this service should serve on
11 | - port: 3306
12 | # label keys and values that must match in order to receive traffic for this service
13 | selector:
14 | name: mysql-pod
15 | context: docker-k8s-lab
16 |
--------------------------------------------------------------------------------
/_archived/javaee/wildfly-rc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: wildfly-rc
5 | labels:
6 | name: wildfly
7 | context: docker-k8s-lab
8 | spec:
9 | replicas: 1
10 | template:
11 | metadata:
12 | labels:
13 | name: wildfly
14 | spec:
15 | containers:
16 | - name: wildfly-rc-pod
17 | image: arungupta/wildfly-mysql-javaee7:k8s
18 | ports:
19 | - containerPort: 8080
--------------------------------------------------------------------------------
/_archived/javaweb-tomcat-sidecar/javaweb-2.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: javaweb-2
5 | spec:
6 | initContainers:
7 | - image: resouer/sample:v2
8 | name: war
9 | command: ["cp", "/sample.war", "/app"]
10 | volumeMounts:
11 | - mountPath: /app
12 | name: app-volume
13 | containers:
14 | - image: resouer/mytomcat:7.0
15 | name: tomcat
16 | command: ["sh","-c","/root/apache-tomcat-7.0.42-v2/bin/start.sh"]
17 | volumeMounts:
18 | - mountPath: /root/apache-tomcat-7.0.42-v2/webapps
19 | name: app-volume
20 | ports:
21 | - containerPort: 8080
22 | hostPort: 8001
23 | volumes:
24 | - name: app-volume
25 | emptyDir: {}
26 |
27 |
--------------------------------------------------------------------------------
/_archived/javaweb-tomcat-sidecar/javaweb.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: javaweb
5 | spec:
6 | initContainers:
7 | - image: resouer/sample:v1
8 | name: war
9 | command: ["cp", "/sample.war", "/app"]
10 | volumeMounts:
11 | - mountPath: /app
12 | name: app-volume
13 | containers:
14 | - image: resouer/mytomcat:7.0
15 | name: tomcat
16 | command: ["sh", "-c", "/root/apache-tomcat-7.0.42-v2/bin/start.sh"]
17 | volumeMounts:
18 | - mountPath: /root/apache-tomcat-7.0.42-v2/webapps
19 | name: app-volume
20 | ports:
21 | - containerPort: 8080
22 | hostPort: 8001
23 | volumes:
24 | - name: app-volume
25 | emptyDir: {}
26 |
--------------------------------------------------------------------------------
/_archived/javaweb-tomcat-sidecar/workflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubernetes/examples/209452cc17f0632f06fa0a1f79060884b8277968/_archived/javaweb-tomcat-sidecar/workflow.png
--------------------------------------------------------------------------------
/_archived/job/expansions/README.md:
--------------------------------------------------------------------------------
1 |
2 | This file has moved to: http://kubernetes.io/docs/user-guide/jobs/
3 |
4 |
--------------------------------------------------------------------------------
/_archived/job/work-queue-1/README.md:
--------------------------------------------------------------------------------
1 |
2 | This file has moved to: http://kubernetes.io/docs/user-guide/jobs/
3 |
4 |
--------------------------------------------------------------------------------
/_archived/job/work-queue-2/README.md:
--------------------------------------------------------------------------------
1 |
2 | This file has moved to: http://kubernetes.io/docs/user-guide/jobs/
3 |
4 |
--------------------------------------------------------------------------------
/_archived/meteor/dockerbase/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM node:0.10
16 |
17 | ONBUILD WORKDIR /appsrc
18 | ONBUILD COPY . /appsrc
19 |
20 | ONBUILD RUN curl https://install.meteor.com/ | sh && \
21 | meteor build ../app --directory --architecture os.linux.x86_64 && \
22 | rm -rf /appsrc
23 | # TODO rm meteor so it doesn't take space in the image?
24 |
25 | ONBUILD WORKDIR /app/bundle
26 |
27 | ONBUILD RUN (cd programs/server && npm install)
28 | EXPOSE 8080
29 | CMD []
30 | ENV PORT 8080
31 | ENTRYPOINT MONGO_URL=mongodb://$MONGO_SERVICE_HOST:$MONGO_SERVICE_PORT /usr/local/bin/node main.js
32 |
--------------------------------------------------------------------------------
/_archived/meteor/dockerbase/README.md:
--------------------------------------------------------------------------------
1 | Building the meteor-kubernetes base image
2 | -----------------------------------------
3 |
4 | As a normal user you don't need to do this since the image is already built and pushed to Docker Hub. You can just use it as a base image. See [this example](https://github.com/Q42/meteor-gke-example/blob/master/Dockerfile).
5 |
6 | To build and push the base meteor-kubernetes image:
7 |
8 | docker build -t chees/meteor-kubernetes .
9 | docker push chees/meteor-kubernetes
10 |
11 |
--------------------------------------------------------------------------------
/_archived/meteor/meteor-controller.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "ReplicationController",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "meteor-controller",
6 | "labels": {
7 | "name": "meteor"
8 | }
9 | },
10 | "spec": {
11 | "replicas": 2,
12 | "template": {
13 | "metadata": {
14 | "labels": {
15 | "name": "meteor"
16 | }
17 | },
18 | "spec": {
19 | "containers": [
20 | {
21 | "name": "meteor",
22 | "image": "chees/meteor-gke-example:latest",
23 | "ports": [
24 | {
25 | "name": "http-server",
26 | "containerPort": 8080
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/_archived/meteor/meteor-service.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Service",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "meteor"
6 | },
7 | "spec": {
8 | "ports": [
9 | {
10 | "port": 80,
11 | "targetPort": "http-server"
12 | }
13 | ],
14 | "selector": {
15 | "name": "meteor"
16 | },
17 | "sessionAffinity": "ClientIP",
18 | "sessionAffinityConfig": {
19 | "clientIP": {
20 | "timeoutSeconds": 90
21 | }
22 | },
23 | "type": "LoadBalancer"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/_archived/meteor/mongo-pod.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Pod",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "mongo",
6 | "labels": {
7 | "name": "mongo",
8 | "role": "mongo"
9 | }
10 | },
11 | "spec": {
12 | "volumes": [
13 | {
14 | "name": "mongo-disk",
15 | "gcePersistentDisk": {
16 | "pdName": "mongo-disk",
17 | "fsType": "ext4"
18 | }
19 | }
20 | ],
21 | "containers": [
22 | {
23 | "name": "mongo",
24 | "image": "mongo:latest",
25 | "ports": [
26 | {
27 | "name": "mongo",
28 | "containerPort": 27017
29 | }
30 | ],
31 | "volumeMounts": [
32 | {
33 | "name": "mongo-disk",
34 | "mountPath": "/data/db"
35 | }
36 | ]
37 | }
38 | ]
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/_archived/meteor/mongo-service.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Service",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "mongo",
6 | "labels": {
7 | "name": "mongo"
8 | }
9 | },
10 | "spec": {
11 | "ports": [
12 | {
13 | "port": 27017,
14 | "targetPort": "mongo"
15 | }
16 | ],
17 | "selector": {
18 | "name": "mongo",
19 | "role": "mongo"
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/_archived/newrelic-infrastructure/.gitignore:
--------------------------------------------------------------------------------
1 | *.local
2 |
--------------------------------------------------------------------------------
/_archived/newrelic-infrastructure/config-to-secret.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2014 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Encodes the environment variables into a Kubernetes secret.
18 |
19 | BASE64_ENC=$(cat nrconfig.env | base64 | tr -d '\n')
20 | sed -e "s#{{config_data}}#${BASE64_ENC}#g" ./newrelic-config-template.yaml > newrelic-config.yaml
21 |
--------------------------------------------------------------------------------
/_archived/newrelic-infrastructure/newrelic-config-template.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: newrelic-config
5 | type: Opaque
6 | data:
7 | config: {{config_data}}
8 |
--------------------------------------------------------------------------------
/_archived/newrelic-infrastructure/nrconfig.env:
--------------------------------------------------------------------------------
1 | #--REQUIRED--
2 | # Put your license key in this variable
3 | export NRIA_LICENSE_KEY=REPLACE_LICENSE_KEY_HERE
4 | #
5 | #--OPTIONAL--
6 | # Set to 1 for debug output in the log
7 | export NRIA_VERBOSE=0
8 | # Can log to any file, but will not create directories
9 | export NRIA_LOG_FILE=/var/log/nr-infra.log
10 |
--------------------------------------------------------------------------------
/_archived/newrelic/config-to-secret.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2014 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Encodes the environment variables into a Kubernetes secret.
18 |
19 | BASE64_ENC=$(cat nrconfig.env | base64 | tr -d '\n')
20 | sed -e "s#{{config_data}}#${BASE64_ENC}#g" ./newrelic-config-template.yaml > newrelic-config.yaml
21 |
--------------------------------------------------------------------------------
/_archived/newrelic/newrelic-config-template.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: newrelic-config
5 | type: Opaque
6 | data:
7 | config: {{config_data}}
8 |
--------------------------------------------------------------------------------
/_archived/newrelic/newrelic-config.yaml:
--------------------------------------------------------------------------------
1 | # This file should be overwritten by ./config-to-secret.sh
2 | # This file is in place to satisfy the kubernetes documentation tests.
3 |
4 | # apiVersion: v1
5 | # kind: Secret
6 | # metadata:
7 | # name: newrelic-config
8 | # type: Opaque
9 | # data:
10 | # config: base64 encoded
11 |
--------------------------------------------------------------------------------
/_archived/newrelic/nrconfig.env:
--------------------------------------------------------------------------------
1 | export NRSYSMOND_loglevel=debug
2 | export NRSYSMOND_license_key=REPLACE_LICENSE_KEY_HERE
3 |
--------------------------------------------------------------------------------
/_archived/nodesjs-mongodb/mongo-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | labels:
5 | name: mongo
6 | name: mongo-controller
7 | spec:
8 | replicas: 1
9 | template:
10 | metadata:
11 | labels:
12 | name: mongo
13 | spec:
14 | containers:
15 | - image: mongo
16 | name: mongo
17 | ports:
18 | - name: mongo
19 | containerPort: 27017
20 | hostPort: 27017
21 | volumeMounts:
22 | - name: mongo-persistent-storage
23 | mountPath: /data/db
24 | volumes:
25 | - name: mongo-persistent-storage
26 | gcePersistentDisk:
27 | pdName: mongo-disk
28 | fsType: ext4
--------------------------------------------------------------------------------
/_archived/nodesjs-mongodb/mongo-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | name: mongo
6 | name: mongo
7 | spec:
8 | ports:
9 | - port: 27017
10 | targetPort: 27017
11 | selector:
12 | name: mongo
--------------------------------------------------------------------------------
/_archived/nodesjs-mongodb/web-controller-demo.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | labels:
5 | name: web
6 | name: web-controller
7 | spec:
8 | replicas: 2
9 | selector:
10 | name: web
11 | template:
12 | metadata:
13 | labels:
14 | name: web
15 | spec:
16 | containers:
17 | - image: node:0.10.40
18 | command: ['/bin/sh', '-c']
19 | args: ['cd /home && git clone https://github.com/ijason/NodeJS-Sample-App.git demo && cd demo/EmployeeDB/ && npm install && sed -i -- ''s/localhost/mongo/g'' app.js && node app.js']
20 | name: web
21 | ports:
22 | - containerPort: 3000
23 | name: http-server
--------------------------------------------------------------------------------
/_archived/nodesjs-mongodb/web-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | labels:
5 | name: web
6 | name: web-controller
7 | spec:
8 | replicas: 2
9 | selector:
10 | name: web
11 | template:
12 | metadata:
13 | labels:
14 | name: web
15 | spec:
16 | containers:
17 | - image:
18 | name: web
19 | ports:
20 | - containerPort: 3000
21 | name: http-server
--------------------------------------------------------------------------------
/_archived/nodesjs-mongodb/web-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: web
5 | labels:
6 | name: web
7 | spec:
8 | type: LoadBalancer
9 | ports:
10 | - port: 80
11 | targetPort: 3000
12 | protocol: TCP
13 | selector:
14 | name: web
--------------------------------------------------------------------------------
/_archived/oms/README.md:
--------------------------------------------------------------------------------
1 | # Microsoft Operations Management Suite (OMS) Container Monitoring Example
2 |
3 | This example is deprecated, for up to date instructions, please visit [https://github.com/Microsoft/OMS-docker/tree/master/Kubernetes](https://github.com/Microsoft/OMS-docker/tree/master/Kubernetes).
4 |
--------------------------------------------------------------------------------
/_archived/openshift-origin/.gitignore:
--------------------------------------------------------------------------------
1 | config/
2 |
--------------------------------------------------------------------------------
/_archived/openshift-origin/etcd-discovery-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: etcd-discovery
5 | spec:
6 | selector:
7 | matchLabels:
8 | name: etcd-discovery
9 | strategy:
10 | type: Recreate
11 | replicas: 1
12 | selector:
13 | matchLabels:
14 | name: etcd-discovery
15 | template:
16 | metadata:
17 | labels:
18 | name: etcd-discovery
19 | spec:
20 | containers:
21 | - name: discovery
22 | image: openshift/etcd-20-centos7
23 | args:
24 | - etcd-discovery.sh
25 | ports:
26 | - containerPort: 2379
27 | protocol: TCP
28 | resources: {}
29 | terminationMessagePath: "/dev/termination-log"
30 | imagePullPolicy: IfNotPresent
31 | securityContext:
32 | capabilities: {}
33 | privileged: false
34 | restartPolicy: Always
35 | dnsPolicy: ClusterFirst
36 | serviceAccount: ''
37 | status: {}
38 |
--------------------------------------------------------------------------------
/_archived/openshift-origin/etcd-discovery-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: etcd-discovery
5 | labels:
6 | name: etcd-discovery
7 | spec:
8 | ports:
9 | - protocol: TCP
10 | port: 2379
11 | targetPort: 2379
12 | nodePort: 0
13 | selector:
14 | name: etcd-discovery
15 | sessionAffinity: None
16 | type: ClusterIP
17 | status:
18 | loadBalancer: {}
19 |
--------------------------------------------------------------------------------
/_archived/openshift-origin/etcd-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: etcd
5 | labels:
6 | name: etcd
7 | spec:
8 | ports:
9 | - name: client
10 | protocol: TCP
11 | port: 2379
12 | targetPort: 2379
13 | nodePort: 0
14 | - name: server
15 | protocol: TCP
16 | port: 2380
17 | targetPort: 2380
18 | nodePort: 0
19 | selector:
20 | name: etcd
21 | sessionAffinity: None
22 | type: ClusterIP
23 | status:
24 | loadBalancer: {}
25 |
--------------------------------------------------------------------------------
/_archived/openshift-origin/openshift-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | labels:
5 | name: openshift
6 | name: openshift
7 | spec:
8 | selector:
9 | matchLabels:
10 | name: openshift
11 | replicas: 1
12 | selector:
13 | matchLabels:
14 | name: openshift
15 | template:
16 | metadata:
17 | labels:
18 | name: openshift
19 | spec:
20 | containers:
21 | - args:
22 | - start
23 | - master
24 | - --config=/config/master-config.yaml
25 | image: "openshift/origin"
26 | name: origin
27 | ports:
28 | - containerPort: 8443
29 | name: openshift
30 | volumeMounts:
31 | - mountPath: /config
32 | name: config
33 | readOnly: true
34 | volumes:
35 | - name: config
36 | secret:
37 | secretName: openshift-config
38 |
--------------------------------------------------------------------------------
/_archived/openshift-origin/openshift-origin-namespace.yaml:
--------------------------------------------------------------------------------
1 | kind: Namespace
2 | apiVersion: v1
3 | metadata:
4 | name: "openshift-origin"
5 | labels:
6 | name: "openshift-origin"
--------------------------------------------------------------------------------
/_archived/openshift-origin/openshift-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: openshift
5 | spec:
6 | ports:
7 | - name: openshift
8 | port: 8443
9 | targetPort: 8443
10 | selector:
11 | name: openshift
12 | type: LoadBalancer
13 |
--------------------------------------------------------------------------------
/_archived/openshift-origin/secret.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubernetes/examples/209452cc17f0632f06fa0a1f79060884b8277968/_archived/openshift-origin/secret.json
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/aws-ebs.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: slow
5 | provisioner: kubernetes.io/aws-ebs
6 | parameters:
7 | type: io1
8 | zone: us-east-1d
9 | iopsPerGB: "10"
10 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/cinder/cinder-storage-class.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: gold
5 | provisioner: kubernetes.io/cinder
6 | parameters:
7 | type: fast
8 | availability: nova
9 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/cinder/example-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: server
5 | spec:
6 | replicas: 1
7 | selector:
8 | role: server
9 | template:
10 | metadata:
11 | labels:
12 | role: server
13 | spec:
14 | containers:
15 | - name: server
16 | image: nginx
17 | volumeMounts:
18 | - mountPath: /var/lib/www/html
19 | name: cinderpvc
20 | volumes:
21 | - name: cinderpvc
22 | persistentVolumeClaim:
23 | claimName: claim1
24 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/claim1.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "PersistentVolumeClaim",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "claim1"
6 | },
7 | "spec": {
8 | "accessModes": [
9 | "ReadWriteOnce"
10 | ],
11 | "resources": {
12 | "requests": {
13 | "storage": "3Gi"
14 | }
15 | },
16 | "storageClassName": "slow"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/gce-pd.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: slow
5 | provisioner: kubernetes.io/gce-pd
6 | parameters:
7 | type: pd-standard
8 | zone: us-central1-a
9 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/glusterfs/glusterfs-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: heketi-secret
5 | namespace: default
6 | data:
7 | # base64 encoded password. E.g.: echo -n "mypassword" | base64
8 | key: bXlwYXNzd29yZA==
9 | type: kubernetes.io/glusterfs
10 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/glusterfs/glusterfs-storageclass.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: storage.k8s.io/v1
2 | kind: StorageClass
3 | metadata:
4 | name: slow
5 | provisioner: kubernetes.io/glusterfs
6 | parameters:
7 | resturl: "http://127.0.0.1:8081"
8 | clusterid: "630372ccdc720a92c681fb928f27b53f"
9 | restuser: "admin"
10 | secretNamespace: "default"
11 | secretName: "heketi-secret"
12 | gidMin: "40000"
13 | gidMax: "50000"
14 | volumetype: "replicate:3"
15 | volumeoptions: "client.ssl on, server.ssl on"
16 | volumenameprefix: "dept-dev"
17 | snapfactor: "10"
18 | customepnameprefix: "dbstorage"
19 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/quobyte/example-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: server
5 | spec:
6 | replicas: 1
7 | selector:
8 | role: server
9 | template:
10 | metadata:
11 | labels:
12 | role: server
13 | spec:
14 | containers:
15 | - name: server
16 | image: nginx
17 | volumeMounts:
18 | - mountPath: /var/lib/www/html
19 | name: quobytepvc
20 | volumes:
21 | - name: quobytepvc
22 | persistentVolumeClaim:
23 | claimName: claim1
24 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/quobyte/quobyte-admin-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: quobyte-admin-secret
5 | type: "kubernetes.io/quobyte"
6 | data:
7 | password: cXVvYnl0ZQ==
8 | user: YWRtaW4=
9 | type: kubernetes.io/quobyte
10 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/quobyte/quobyte-storage-class.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: storage.k8s.io/v1
2 | kind: StorageClass
3 | metadata:
4 | name: slow
5 | provisioner: kubernetes.io/quobyte
6 | parameters:
7 | quobyteAPIServer: "http://138.68.74.142:7860"
8 | registry: "138.68.74.142:7861"
9 | adminSecretName: "quobyte-admin-secret"
10 | adminSecretNamespace: "kube-system"
11 | user: "root"
12 | group: "root"
13 | quobyteConfig: "BASE"
14 | quobyteTenant: "DEFAULT"
15 | createQuota: "False"
16 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/rbd/ceph-secret-admin.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: ceph-secret-admin
5 | type: "kubernetes.io/rbd"
6 | data:
7 | #Please note this value is base64 encoded.
8 | key: QVFEQ1pMdFhPUnQrSmhBQUFYaERWNHJsZ3BsMmNjcDR6RFZST0E9PQ==
9 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/rbd/ceph-secret-user.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: ceph-secret-user
5 | type: "kubernetes.io/rbd"
6 | data:
7 | #Please note this value is base64 encoded.
8 | key: QVFBTWdYaFZ3QkNlRGhBQTlubFBhRnlmVVNhdEdENGRyRldEdlE9PQ==
9 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/rbd/pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: server
5 | spec:
6 | replicas: 1
7 | selector:
8 | role: server
9 | template:
10 | metadata:
11 | labels:
12 | role: server
13 | spec:
14 | containers:
15 | - name: server
16 | image: nginx
17 | volumeMounts:
18 | - mountPath: /var/lib/www/html
19 | name: mypvc
20 | volumes:
21 | - name: mypvc
22 | persistentVolumeClaim:
23 | claimName: claim1
24 |
--------------------------------------------------------------------------------
/_archived/persistent-volume-provisioning/rbd/rbd-storage-class.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: storage.k8s.io/v1
2 | kind: StorageClass
3 | metadata:
4 | name: slow
5 | provisioner: kubernetes.io/rbd
6 | parameters:
7 | monitors: 127.0.0.1:6789
8 | adminId: admin
9 | adminSecretName: ceph-secret-admin
10 | adminSecretNamespace: "kube-system"
11 | pool: kube
12 | userId: kube
13 | userSecretName: ceph-secret-user
14 |
15 |
--------------------------------------------------------------------------------
/_archived/phabricator/phabricator-controller.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "ReplicationController",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "phabricator-controller",
6 | "labels": {
7 | "name": "phabricator"
8 | }
9 | },
10 | "spec": {
11 | "replicas": 1,
12 | "selector": {
13 | "name": "phabricator"
14 | },
15 | "template": {
16 | "metadata": {
17 | "labels": {
18 | "name": "phabricator"
19 | }
20 | },
21 | "spec": {
22 | "containers": [
23 | {
24 | "name": "phabricator",
25 | "image": "fgrzadkowski/example-php-phabricator",
26 | "ports": [
27 | {
28 | "name": "http-server",
29 | "containerPort": 80
30 | }
31 | ],
32 | "env": [
33 | {
34 | "name": "MYSQL_SERVICE_IP",
35 | "value": "1.2.3.4"
36 | },
37 | {
38 | "name": "MYSQL_SERVICE_PORT",
39 | "value": "3306"
40 | },
41 | {
42 | "name": "MYSQL_PASSWORD",
43 | "value": "1234"
44 | }
45 | ]
46 | }
47 | ]
48 | }
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/_archived/phabricator/phabricator-service.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Service",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "phabricator"
6 | },
7 | "spec": {
8 | "ports": [
9 | {
10 | "port": 80,
11 | "targetPort": "http-server"
12 | }
13 | ],
14 | "selector": {
15 | "name": "phabricator"
16 | },
17 | "type": "LoadBalancer"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/_archived/phabricator/php-phabricator/000-default.conf:
--------------------------------------------------------------------------------
1 |
2 | Require all granted
3 |
4 |
5 |
6 | DocumentRoot /home/www-data/phabricator/webroot
7 |
8 | RewriteEngine on
9 | RewriteRule ^/rsrc/(.*) - [L,QSA]
10 | RewriteRule ^/favicon.ico - [L,QSA]
11 | RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
12 |
13 |
--------------------------------------------------------------------------------
/_archived/phabricator/php-phabricator/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | echo "MySQL host IP ${MYSQL_SERVICE_IP} port ${MYSQL_SERVICE_PORT}."
18 | /home/www-data/phabricator/bin/config set mysql.host $MYSQL_SERVICE_IP
19 | /home/www-data/phabricator/bin/config set mysql.port $MYSQL_SERVICE_PORT
20 | /home/www-data/phabricator/bin/config set mysql.pass $MYSQL_PASSWORD
21 |
22 | echo "Running storage upgrade"
23 | /home/www-data/phabricator/bin/storage --force upgrade || exit 1
24 |
25 | source /etc/apache2/envvars
26 | echo "Starting Apache2"
27 | apache2 -D FOREGROUND
28 |
29 |
--------------------------------------------------------------------------------
/_archived/phabricator/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | echo "Create Phabricator replication controller" && kubectl create -f phabricator-controller.json
18 | echo "Create Phabricator service" && kubectl create -f phabricator-service.json
19 | echo "Create firewall rule" && gcloud compute firewall-rules create phabricator-node-80 --allow=tcp:80 --target-tags kubernetes-node
20 |
21 |
--------------------------------------------------------------------------------
/_archived/phabricator/teardown.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | echo "Deleting Phabricator service" && kubectl delete -f phabricator-service.json
18 | echo "Deleting Phabricator replication controller" && kubectl delete rc phabricator-controller
19 | echo "Delete firewall rule" && gcloud compute firewall-rules delete -q phabricator-node-80
20 |
21 |
--------------------------------------------------------------------------------
/_archived/pod:
--------------------------------------------------------------------------------
1 | # Copy of pod.yaml without file extension for test
2 | apiVersion: v1
3 | kind: Pod
4 | metadata:
5 | name: nginx
6 | labels:
7 | name: nginx
8 | spec:
9 | containers:
10 | - name: nginx
11 | image: nginx
12 | ports:
13 | - containerPort: 80
14 |
--------------------------------------------------------------------------------
/_archived/podsecuritypolicy/OWNERS:
--------------------------------------------------------------------------------
1 | # See the OWNERS docs at https://go.k8s.io/owners
2 |
3 | approvers:
4 | - deads2k
5 | - ericchiang
6 | - liggitt
7 | - tallclair
8 | reviewers:
9 | - deads2k
10 | - ericchiang
11 | - liggitt
12 | - php-coder
13 | - tallclair
14 |
--------------------------------------------------------------------------------
/_archived/podsecuritypolicy/rbac/bindings.yaml:
--------------------------------------------------------------------------------
1 | # privileged-psp-users gives the privileged-psp-user role
2 | # to the group privileged-psp-users.
3 | apiVersion: rbac.authorization.k8s.io/v1
4 | kind: ClusterRoleBinding
5 | metadata:
6 | name: privileged-psp-users
7 | subjects:
8 | - kind: Group
9 | apiGroup: rbac.authorization.k8s.io
10 | name: privileged-psp-users
11 | roleRef:
12 | apiGroup: rbac.authorization.k8s.io
13 | kind: ClusterRole
14 | name: privileged-psp-user
15 | ---
16 | # restricted-psp-users grants the restricted-psp-user role to
17 | # the groups restricted-psp-users and privileged-psp-users.
18 | apiVersion: rbac.authorization.k8s.io/v1
19 | kind: ClusterRoleBinding
20 | metadata:
21 | name: restricted-psp-users
22 | subjects:
23 | - kind: Group
24 | apiGroup: rbac.authorization.k8s.io
25 | name: restricted-psp-users
26 | - kind: Group
27 | apiGroup: rbac.authorization.k8s.io
28 | name: privileged-psp-users
29 | roleRef:
30 | apiGroup: rbac.authorization.k8s.io
31 | kind: ClusterRole
32 | name: restricted-psp-user
33 | ---
34 | # edit grants edit role to the groups
35 | # restricted-psp-users and privileged-psp-users.
36 | apiVersion: rbac.authorization.k8s.io/v1
37 | kind: ClusterRoleBinding
38 | metadata:
39 | name: edit
40 | subjects:
41 | - kind: Group
42 | apiGroup: rbac.authorization.k8s.io
43 | name: privileged-psp-users
44 | - kind: Group
45 | apiGroup: rbac.authorization.k8s.io
46 | name: restricted-psp-users
47 | roleRef:
48 | apiGroup: rbac.authorization.k8s.io
49 | kind: ClusterRole
50 | name: edit
51 |
--------------------------------------------------------------------------------
/_archived/podsecuritypolicy/rbac/pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: nginx
5 | labels:
6 | name: nginx
7 | spec:
8 | containers:
9 | - name: nginx
10 | image: nginx
11 | ports:
12 | - containerPort: 80
13 |
--------------------------------------------------------------------------------
/_archived/podsecuritypolicy/rbac/pod_priv.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: nginx
5 | labels:
6 | name: nginx
7 | spec:
8 | containers:
9 | - name: nginx
10 | image: nginx
11 | ports:
12 | - containerPort: 80
13 | securityContext:
14 | privileged: true
15 |
--------------------------------------------------------------------------------
/_archived/podsecuritypolicy/rbac/policies.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: policy/v1beta1
2 | kind: PodSecurityPolicy
3 | metadata:
4 | name: privileged
5 | spec:
6 | fsGroup:
7 | rule: RunAsAny
8 | privileged: true
9 | runAsUser:
10 | rule: RunAsAny
11 | seLinux:
12 | rule: RunAsAny
13 | supplementalGroups:
14 | rule: RunAsAny
15 | volumes:
16 | - '*'
17 | allowedCapabilities:
18 | - '*'
19 | hostPID: true
20 | hostIPC: true
21 | hostNetwork: true
22 | hostPorts:
23 | - min: 1
24 | max: 65536
25 | ---
26 | apiVersion: policy/v1beta1
27 | kind: PodSecurityPolicy
28 | metadata:
29 | name: restricted
30 | spec:
31 | privileged: false
32 | fsGroup:
33 | rule: RunAsAny
34 | runAsUser:
35 | rule: MustRunAsNonRoot
36 | seLinux:
37 | rule: RunAsAny
38 | supplementalGroups:
39 | rule: RunAsAny
40 | volumes:
41 | - 'emptyDir'
42 | - 'secret'
43 | - 'downwardAPI'
44 | - 'configMap'
45 | - 'persistentVolumeClaim'
46 | - 'projected'
47 | hostPID: false
48 | hostIPC: false
49 | hostNetwork: false
50 |
--------------------------------------------------------------------------------
/_archived/podsecuritypolicy/rbac/roles.yaml:
--------------------------------------------------------------------------------
1 | # restricted-psp-user grants access to use the restricted PSP.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: restricted-psp-user
6 | rules:
7 | - apiGroups:
8 | - policy
9 | resources:
10 | - podsecuritypolicies
11 | resourceNames:
12 | - restricted
13 | verbs:
14 | - use
15 | ---
16 | # privileged-psp-user grants access to use the privileged PSP.
17 | apiVersion: rbac.authorization.k8s.io/v1
18 | kind: ClusterRole
19 | metadata:
20 | name: privileged-psp-user
21 | rules:
22 | - apiGroups:
23 | - policy
24 | resources:
25 | - podsecuritypolicies
26 | resourceNames:
27 | - privileged
28 | verbs:
29 | - use
30 |
--------------------------------------------------------------------------------
/_archived/scheduler-policy/scheduler-policy-config-with-extender.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind" : "Policy",
3 | "apiVersion" : "v1",
4 | "extenders" : [
5 | {
6 | "urlPrefix": "http://127.0.0.1:12346/scheduler",
7 | "filterVerb": "filter",
8 | "bindVerb": "bind",
9 | "prioritizeVerb": "prioritize",
10 | "preemptVerb": "preempt",
11 | "weight": 5,
12 | "enableHttps": false,
13 | "nodeCacheCapable": false
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/_archived/selenium/selenium-hub-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: selenium-hub
5 | labels:
6 | app: selenium-hub
7 | spec:
8 | replicas: 1
9 | selector:
10 | matchLabels:
11 | app: selenium-hub
12 | template:
13 | metadata:
14 | labels:
15 | app: selenium-hub
16 | spec:
17 | containers:
18 | - name: selenium-hub
19 | image: selenium/hub:4.0
20 | ports:
21 | - containerPort: 4444
22 | - containerPort: 4443
23 | - containerPort: 4442
24 | resources:
25 | limits:
26 | memory: "1000Mi"
27 | cpu: ".5"
28 | livenessProbe:
29 | httpGet:
30 | path: /wd/hub/status
31 | port: 4444
32 | initialDelaySeconds: 30
33 | timeoutSeconds: 5
34 | readinessProbe:
35 | httpGet:
36 | path: /wd/hub/status
37 | port: 4444
38 | initialDelaySeconds: 30
39 | timeoutSeconds: 5
40 |
--------------------------------------------------------------------------------
/_archived/selenium/selenium-hub-svc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: selenium-hub
5 | labels:
6 | app: selenium-hub
7 | spec:
8 | ports:
9 | - port: 4444
10 | targetPort: 4444
11 | name: port0
12 | - port: 4443
13 | targetPort: 4443
14 | name: port1
15 | - port: 4442
16 | targetPort: 4442
17 | name: port2
18 | selector:
19 | app: selenium-hub
20 | type: NodePort
21 | sessionAffinity: None
22 |
--------------------------------------------------------------------------------
/_archived/selenium/selenium-node-chrome-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: selenium-node-chrome
5 | labels:
6 | app: selenium-node-chrome
7 | spec:
8 | replicas: 2
9 | selector:
10 | matchLabels:
11 | app: selenium-node-chrome
12 | template:
13 | metadata:
14 | labels:
15 | app: selenium-node-chrome
16 | spec:
17 | volumes:
18 | - name: dshm
19 | emptyDir:
20 | medium: Memory
21 | containers:
22 | - name: selenium-node-chrome
23 | image: selenium/node-chrome:4.0
24 | ports:
25 | - containerPort: 5555
26 | volumeMounts:
27 | - mountPath: /dev/shm
28 | name: dshm
29 | env:
30 | - name: SE_EVENT_BUS_HOST
31 | value: "selenium-hub"
32 | - name: SE_EVENT_BUS_SUBSCRIBE_PORT
33 | value: "4443"
34 | - name: SE_EVENT_BUS_PUBLISH_PORT
35 | value: "4442"
36 | resources:
37 | limits:
38 | memory: "1000Mi"
39 | cpu: ".5"
40 |
--------------------------------------------------------------------------------
/_archived/selenium/selenium-node-firefox-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: selenium-node-firefox
5 | labels:
6 | app: selenium-node-firefox
7 | spec:
8 | replicas: 2
9 | selector:
10 | matchLabels:
11 | app: selenium-node-firefox
12 | template:
13 | metadata:
14 | labels:
15 | app: selenium-node-firefox
16 | spec:
17 | volumes:
18 | - name: dshm
19 | emptyDir:
20 | medium: Memory
21 | containers:
22 | - name: selenium-node-firefox
23 | image: selenium/node-firefox:4.0
24 | ports:
25 | - containerPort: 5555
26 | volumeMounts:
27 | - mountPath: /dev/shm
28 | name: dshm
29 | env:
30 | - name: SE_EVENT_BUS_HOST
31 | value: "selenium-hub"
32 | - name: SE_EVENT_BUS_SUBSCRIBE_PORT
33 | value: "4443"
34 | - name: SE_EVENT_BUS_PUBLISH_PORT
35 | value: "4442"
36 | resources:
37 | limits:
38 | memory: "1000Mi"
39 | cpu: ".5"
40 |
--------------------------------------------------------------------------------
/_archived/selenium/selenium-test.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | from selenium import webdriver
18 |
19 | def check_browser(browser):
20 | if browser == "CHROME":
21 | options = webdriver.ChromeOptions()
22 | elif browser == "FIREFOX":
23 | options = webdriver.FirefoxOptions()
24 | driver = webdriver.Remote(
25 | command_executor='http://selenium-hub:4444/wd/hub',
26 | options=options
27 | )
28 | driver.get("http://www.google.com")
29 | assert "google" in driver.page_source
30 | driver.quit()
31 | print("Browser %s checks out!" % browser)
32 |
33 |
34 | check_browser("FIREFOX")
35 | check_browser("CHROME")
36 |
37 |
--------------------------------------------------------------------------------
/_archived/spark/namespace-spark-cluster.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Namespace
3 | metadata:
4 | name: "spark-cluster"
5 | labels:
6 | name: "spark-cluster"
7 |
--------------------------------------------------------------------------------
/_archived/spark/spark-gluster/glusterfs-endpoints.yaml:
--------------------------------------------------------------------------------
1 | kind: Endpoints
2 | apiVersion: v1
3 | metadata:
4 | name: glusterfs-cluster
5 | namespace: spark-cluster
6 | subsets:
7 | - addresses:
8 | - ip: 192.168.30.104
9 | ports:
10 | - port: 1
11 | - addresses:
12 | - ip: 192.168.30.105
13 | ports:
14 | - port: 1
15 |
--------------------------------------------------------------------------------
/_archived/spark/spark-gluster/spark-master-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: spark-master-controller
5 | namespace: spark-cluster
6 | labels:
7 | component: spark-master
8 | spec:
9 | replicas: 1
10 | selector:
11 | component: spark-master
12 | template:
13 | metadata:
14 | labels:
15 | component: spark-master
16 | spec:
17 | containers:
18 | - name: spark-master
19 | image: registry.k8s.io/spark:1.5.2_v1
20 | command: ["/start-master"]
21 | ports:
22 | - containerPort: 7077
23 | volumeMounts:
24 | - mountPath: /mnt/glusterfs
25 | name: glusterfsvol
26 | resources:
27 | requests:
28 | cpu: 100m
29 | volumes:
30 | - name: glusterfsvol
31 | glusterfs:
32 | endpoints: glusterfs-cluster
33 | path: MyVolume
34 | readOnly: false
35 |
--------------------------------------------------------------------------------
/_archived/spark/spark-gluster/spark-master-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: spark-master
5 | namespace: spark-cluster
6 | labels:
7 | component: spark-master-service
8 | spec:
9 | ports:
10 | - port: 7077
11 | targetPort: 7077
12 | selector:
13 | component: spark-master
14 |
--------------------------------------------------------------------------------
/_archived/spark/spark-gluster/spark-worker-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: spark-gluster-worker-controller
5 | namespace: spark-cluster
6 | labels:
7 | component: spark-worker
8 | spec:
9 | replicas: 2
10 | selector:
11 | component: spark-worker
12 | template:
13 | metadata:
14 | labels:
15 | component: spark-worker
16 | uses: spark-master
17 | spec:
18 | containers:
19 | - name: spark-worker
20 | image: registry.k8s.io/spark:1.5.2_v1
21 | command: ["/start-worker"]
22 | ports:
23 | - containerPort: 8888
24 | volumeMounts:
25 | - mountPath: /mnt/glusterfs
26 | name: glusterfsvol
27 | resources:
28 | requests:
29 | cpu: 100m
30 | volumes:
31 | - name: glusterfsvol
32 | glusterfs:
33 | endpoints: glusterfs-cluster
34 | path: MyVolume
35 | readOnly: false
36 |
--------------------------------------------------------------------------------
/_archived/spark/spark-master-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: spark-master-controller
5 | spec:
6 | replicas: 1
7 | selector:
8 | component: spark-master
9 | template:
10 | metadata:
11 | labels:
12 | component: spark-master
13 | spec:
14 | containers:
15 | - name: spark-master
16 | image: registry.k8s.io/spark:1.5.2_v1
17 | command: ["/start-master"]
18 | ports:
19 | - containerPort: 7077
20 | - containerPort: 8080
21 | resources:
22 | requests:
23 | cpu: 100m
24 |
--------------------------------------------------------------------------------
/_archived/spark/spark-master-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: spark-master
5 | spec:
6 | ports:
7 | - port: 7077
8 | targetPort: 7077
9 | name: spark
10 | - port: 8080
11 | targetPort: 8080
12 | name: http
13 | selector:
14 | component: spark-master
15 |
--------------------------------------------------------------------------------
/_archived/spark/spark-ui-proxy-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: spark-ui-proxy-controller
5 | spec:
6 | replicas: 1
7 | selector:
8 | component: spark-ui-proxy
9 | template:
10 | metadata:
11 | labels:
12 | component: spark-ui-proxy
13 | spec:
14 | containers:
15 | - name: spark-ui-proxy
16 | image: elsonrodriguez/spark-ui-proxy:1.0
17 | ports:
18 | - containerPort: 80
19 | resources:
20 | requests:
21 | cpu: 100m
22 | args:
23 | - spark-master:8080
24 | livenessProbe:
25 | httpGet:
26 | path: /
27 | port: 80
28 | initialDelaySeconds: 120
29 | timeoutSeconds: 5
30 |
--------------------------------------------------------------------------------
/_archived/spark/spark-ui-proxy-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: spark-ui-proxy
5 | spec:
6 | ports:
7 | - port: 80
8 | targetPort: 80
9 | selector:
10 | component: spark-ui-proxy
11 | type: LoadBalancer
12 |
--------------------------------------------------------------------------------
/_archived/spark/spark-worker-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: spark-worker-controller
5 | spec:
6 | replicas: 2
7 | selector:
8 | component: spark-worker
9 | template:
10 | metadata:
11 | labels:
12 | component: spark-worker
13 | spec:
14 | containers:
15 | - name: spark-worker
16 | image: registry.k8s.io/spark:1.5.2_v1
17 | command: ["/start-worker"]
18 | ports:
19 | - containerPort: 8081
20 | resources:
21 | requests:
22 | cpu: 100m
23 |
24 |
--------------------------------------------------------------------------------
/_archived/spark/zeppelin-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: zeppelin-controller
5 | spec:
6 | replicas: 1
7 | selector:
8 | component: zeppelin
9 | template:
10 | metadata:
11 | labels:
12 | component: zeppelin
13 | spec:
14 | containers:
15 | - name: zeppelin
16 | image: registry.k8s.io/zeppelin:v0.5.6_v1
17 | ports:
18 | - containerPort: 8080
19 | resources:
20 | requests:
21 | cpu: 100m
22 |
--------------------------------------------------------------------------------
/_archived/spark/zeppelin-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: zeppelin
5 | spec:
6 | ports:
7 | - port: 80
8 | targetPort: 8080
9 | selector:
10 | component: zeppelin
11 | type: LoadBalancer
12 |
--------------------------------------------------------------------------------
/_archived/storage/hazelcast/hazelcast-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: hazelcast
5 | labels:
6 | name: hazelcast
7 | spec:
8 | selector:
9 | matchLabels:
10 | name: hazelcast
11 | template:
12 | metadata:
13 | labels:
14 | name: hazelcast
15 | spec:
16 | containers:
17 | - name: hazelcast
18 | image: quay.io/pires/hazelcast-kubernetes:3.8_1
19 | imagePullPolicy: Always
20 | env:
21 | - name: "DNS_DOMAIN"
22 | value: "cluster.local"
23 | - name: POD_NAMESPACE
24 | valueFrom:
25 | fieldRef:
26 | fieldPath: metadata.namespace
27 | ports:
28 | - name: hazelcast
29 | containerPort: 5701
30 |
--------------------------------------------------------------------------------
/_archived/storage/hazelcast/hazelcast-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | name: hazelcast
6 | name: hazelcast
7 | spec:
8 | ports:
9 | - port: 5701
10 | selector:
11 | name: hazelcast
12 |
--------------------------------------------------------------------------------
/_archived/storage/minio/minio-distributed-headless-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: minio
5 | labels:
6 | app: minio
7 | spec:
8 | clusterIP: None
9 | ports:
10 | - port: 9000
11 | name: minio
12 | selector:
13 | app: minio
14 |
--------------------------------------------------------------------------------
/_archived/storage/minio/minio-distributed-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: minio-service
5 | spec:
6 | type: LoadBalancer
7 | ports:
8 | - port: 9000
9 | targetPort: 9000
10 | protocol: TCP
11 | selector:
12 | app: minio
13 |
--------------------------------------------------------------------------------
/_archived/storage/minio/minio-standalone-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | # This name uniquely identifies the Deployment
5 | name: minio-deployment
6 | spec:
7 | selector:
8 | matchLabels:
9 | app: minio
10 | strategy:
11 | type: Recreate
12 | template:
13 | metadata:
14 | labels:
15 | # Label is used as selector in the service.
16 | app: minio
17 | spec:
18 | # Refer to the PVC created earlier
19 | volumes:
20 | - name: storage
21 | persistentVolumeClaim:
22 | # Name of the PVC created earlier
23 | claimName: minio-pv-claim
24 | containers:
25 | - name: minio
26 | # Pulls the default Minio image from Docker Hub
27 | image: minio/minio:latest
28 | args:
29 | - server
30 | - /storage
31 | env:
32 | # Minio access key and secret key
33 | - name: MINIO_ACCESS_KEY
34 | value: "minio"
35 | - name: MINIO_SECRET_KEY
36 | value: "minio123"
37 | ports:
38 | - containerPort: 9000
39 | hostPort: 9000
40 | # Mount the volume into the pod
41 | volumeMounts:
42 | - name: storage # must match the volume name, above
43 | mountPath: "/storage"
44 |
--------------------------------------------------------------------------------
/_archived/storage/minio/minio-standalone-pvc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | # This name uniquely identifies the PVC. Will be used in deployment below.
5 | name: minio-pv-claim
6 | labels:
7 | app: minio-storage-claim
8 | spec:
9 | # Read more about access modes here: http://kubernetes.io/docs/user-guide/persistent-volumes/#access-modes
10 | accessModes:
11 | - ReadWriteOnce
12 | storageClassName: standard
13 | resources:
14 | # This is the request for storage. Should be available in the cluster.
15 | requests:
16 | storage: 10Gi
17 |
--------------------------------------------------------------------------------
/_archived/storage/minio/minio-standalone-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: minio-service
5 | spec:
6 | type: LoadBalancer
7 | ports:
8 | - port: 9000
9 | targetPort: 9000
10 | protocol: TCP
11 | selector:
12 | app: minio
13 |
--------------------------------------------------------------------------------
/_archived/storage/mysql-galera/image/cluster.cnf:
--------------------------------------------------------------------------------
1 | [mysqld]
2 |
3 | wsrep_provider=/usr/lib/libgalera_smm.so
4 | wsrep_cluster_address=gcomm://
5 | binlog_format=ROW
6 | default_storage_engine=InnoDB
7 | innodb_autoinc_lock_mode=2
8 |
9 | wsrep_sst_method=xtrabackup-v2
10 | wsrep_node_address=127.0.0.1
11 | wsrep_cluster_name=galera_kubernetes
12 | wsrep_sst_auth=sstuser:changethis
13 |
--------------------------------------------------------------------------------
/_archived/storage/mysql-galera/image/my.cnf:
--------------------------------------------------------------------------------
1 | [client]
2 | port=3306
3 | socket=/var/run/mysqld/mysqld.sock
4 |
5 | [mysqld_safe]
6 | socket=/var/run/mysqld/mysqld.sock
7 | nice=0
8 |
9 | [mysqld]
10 | user=mysql
11 | pid-file=/var/run/mysqld/mysqld.pid
12 | socket=/var/run/mysqld/mysqld.sock
13 | port=3306
14 | basedir=/usr
15 | datadir=/var/lib/mysql
16 | tmpdir=/tmp
17 | lc-messages-dir=/usr/share/mysql
18 | skip-external-locking
19 |
20 | key_buffer=16M
21 | max_allowed_packet=16M
22 | thread_stack=192K
23 | thread_cache_size=8
24 |
25 | myisam-recover=BACKUP
26 | #max_connections=100
27 | query_cache_limit=1M
28 | query_cache_size=16M
29 | slow_query_log=1
30 | slow_query_log_file=/var/log/mysql/mysql-slow.log
31 | long_query_time=2
32 | log-queries-not-using-indexes
33 |
34 | server-id=12345
35 | log_bin=/var/log/mysql/mysql-bin.log
36 | expire_logs_days=4
37 | max_binlog_size=100M
38 |
39 | default_storage_engine=InnoDB
40 | innodb_file_per_table
41 | innodb_log_file_size=100M
42 | innodb_log_buffer_size=10M
43 | innodb_log_files_in_group=2
44 | innodb_buffer_pool_instances=4
45 | innodb_buffer_pool_size=100M
46 |
47 | [mysqldump]
48 | quick
49 | quote-names
50 | max_allowed_packet=16M
51 |
52 | [isamchk]
53 | key_buffer=16M
54 |
55 | !includedir /etc/mysql/conf.d/
56 |
--------------------------------------------------------------------------------
/_archived/storage/mysql-galera/pxc-cluster-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: pxc-cluster
5 | labels:
6 | unit: pxc-cluster
7 | spec:
8 | ports:
9 | - port: 3306
10 | name: mysql
11 | selector:
12 | unit: pxc-cluster
--------------------------------------------------------------------------------
/_archived/storage/mysql-galera/pxc-node1.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: pxc-node1
5 | labels:
6 | node: pxc-node1
7 | spec:
8 | ports:
9 | - port: 3306
10 | name: mysql
11 | - port: 4444
12 | name: state-snapshot-transfer
13 | - port: 4567
14 | name: replication-traffic
15 | - port: 4568
16 | name: incremental-state-transfer
17 | selector:
18 | node: pxc-node1
19 | ---
20 | apiVersion: v1
21 | kind: ReplicationController
22 | metadata:
23 | name: pxc-node1
24 | spec:
25 | replicas: 1
26 | template:
27 | metadata:
28 | labels:
29 | node: pxc-node1
30 | unit: pxc-cluster
31 | spec:
32 | containers:
33 | - resources:
34 | limits:
35 | cpu: 0.3
36 | image: capttofu/percona_xtradb_cluster_5_6:beta
37 | name: pxc-node1
38 | ports:
39 | - containerPort: 3306
40 | - containerPort: 4444
41 | - containerPort: 4567
42 | - containerPort: 4568
43 | env:
44 | - name: GALERA_CLUSTER
45 | value: "true"
46 | - name: WSREP_CLUSTER_ADDRESS
47 | value: gcomm://
48 | - name: WSREP_SST_USER
49 | value: sst
50 | - name: WSREP_SST_PASSWORD
51 | value: sst
52 | - name: MYSQL_USER
53 | value: mysql
54 | - name: MYSQL_PASSWORD
55 | value: mysql
56 | - name: MYSQL_ROOT_PASSWORD
57 | value: c-krit
58 |
--------------------------------------------------------------------------------
/_archived/storage/redis/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM alpine:3.8
16 |
17 | RUN apk add --no-cache redis sed bash
18 |
19 | COPY redis-master.conf /redis-master/redis.conf
20 | COPY redis-slave.conf /redis-slave/redis.conf
21 | COPY run.sh /run.sh
22 |
23 | CMD [ "/run.sh" ]
24 |
25 | ENTRYPOINT [ "bash", "-c" ]
26 |
--------------------------------------------------------------------------------
/_archived/storage/redis/redis-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: redis
5 | spec:
6 | replicas: 1
7 | selector:
8 | name: redis
9 | template:
10 | metadata:
11 | labels:
12 | name: redis
13 | role: master
14 | spec:
15 | containers:
16 | - name: redis
17 | image: registry.k8s.io/redis:v1
18 | ports:
19 | - containerPort: 6379
20 | resources:
21 | limits:
22 | cpu: "0.1"
23 | volumeMounts:
24 | - mountPath: /redis-master-data
25 | name: data
26 | volumes:
27 | - name: data
28 |
--------------------------------------------------------------------------------
/_archived/storage/redis/redis-master.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | labels:
5 | name: redis
6 | redis-sentinel: "true"
7 | role: master
8 | name: redis-master
9 | spec:
10 | containers:
11 | - name: master
12 | image: registry.k8s.io/redis:v1
13 | env:
14 | - name: MASTER
15 | value: "true"
16 | ports:
17 | - containerPort: 6379
18 | resources:
19 | limits:
20 | cpu: "0.1"
21 | volumeMounts:
22 | - mountPath: /redis-master-data
23 | name: data
24 | - name: sentinel
25 | image: registry.k8s.io/redis:v1
26 | env:
27 | - name: SENTINEL
28 | value: "true"
29 | ports:
30 | - containerPort: 26379
31 | volumes:
32 | - name: data
33 | emptyDir: {}
34 |
--------------------------------------------------------------------------------
/_archived/storage/redis/redis-sentinel-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: redis-sentinel
5 | spec:
6 | replicas: 1
7 | selector:
8 | redis-sentinel: "true"
9 | template:
10 | metadata:
11 | labels:
12 | name: redis-sentinel
13 | redis-sentinel: "true"
14 | role: sentinel
15 | spec:
16 | containers:
17 | - name: sentinel
18 | image: registry.k8s.io/redis:v1
19 | env:
20 | - name: SENTINEL
21 | value: "true"
22 | ports:
23 | - containerPort: 26379
24 |
--------------------------------------------------------------------------------
/_archived/storage/redis/redis-sentinel-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | name: sentinel
6 | role: service
7 | name: redis-sentinel
8 | spec:
9 | ports:
10 | - port: 26379
11 | targetPort: 26379
12 | selector:
13 | redis-sentinel: "true"
14 |
--------------------------------------------------------------------------------
/_archived/storage/rethinkdb/admin-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | labels:
5 | db: rethinkdb
6 | role: admin
7 | name: rethinkdb-admin
8 | spec:
9 | containers:
10 | - image: registry.k8s.io/rethinkdb:1.16.0_1
11 | name: rethinkdb
12 | env:
13 | - name: POD_NAMESPACE
14 | valueFrom:
15 | fieldRef:
16 | fieldPath: metadata.namespace
17 | ports:
18 | - containerPort: 8080
19 | name: admin-port
20 | - containerPort: 28015
21 | name: driver-port
22 | - containerPort: 29015
23 | name: cluster-port
24 | volumeMounts:
25 | - mountPath: /data/rethinkdb_data
26 | name: rethinkdb-storage
27 | volumes:
28 | - name: rethinkdb-storage
29 | emptyDir: {}
30 |
--------------------------------------------------------------------------------
/_archived/storage/rethinkdb/admin-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | db: rethinkdb
6 | name: rethinkdb-admin
7 | spec:
8 | ports:
9 | - port: 8080
10 | targetPort: 8080
11 | type: LoadBalancer
12 | selector:
13 | db: rethinkdb
14 | role: admin
15 |
--------------------------------------------------------------------------------
/_archived/storage/rethinkdb/driver-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | db: rethinkdb
6 | name: rethinkdb-driver
7 | spec:
8 | ports:
9 | - port: 28015
10 | targetPort: 28015
11 | selector:
12 | db: rethinkdb
13 |
--------------------------------------------------------------------------------
/_archived/storage/rethinkdb/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM rethinkdb:1.16.0
16 |
17 |
18 | RUN apt-get update && \
19 | apt-get install -yq curl && \
20 | rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && \
21 | curl -L http://stedolan.github.io/jq/download/linux64/jq > /usr/bin/jq && \
22 | chmod u+x /usr/bin/jq
23 |
24 | COPY ./run.sh /usr/bin/run.sh
25 | RUN chmod u+x /usr/bin/run.sh
26 |
27 | CMD "/usr/bin/run.sh"
28 |
--------------------------------------------------------------------------------
/_archived/storage/rethinkdb/rc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | labels:
5 | db: rethinkdb
6 | name: rethinkdb-rc
7 | spec:
8 | replicas: 1
9 | selector:
10 | db: rethinkdb
11 | role: replicas
12 | template:
13 | metadata:
14 | labels:
15 | db: rethinkdb
16 | role: replicas
17 | spec:
18 | containers:
19 | - image: registry.k8s.io/rethinkdb:1.16.0_1
20 | name: rethinkdb
21 | env:
22 | - name: POD_NAMESPACE
23 | valueFrom:
24 | fieldRef:
25 | fieldPath: metadata.namespace
26 | ports:
27 | - containerPort: 8080
28 | name: admin-port
29 | - containerPort: 28015
30 | name: driver-port
31 | - containerPort: 29015
32 | name: cluster-port
33 | volumeMounts:
34 | - mountPath: /data/rethinkdb_data
35 | name: rethinkdb-storage
36 | volumes:
37 | - name: rethinkdb-storage
38 | emptyDir: {}
39 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/create_test_table.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE messages (
2 | page BIGINT(20) UNSIGNED,
3 | time_created_ns BIGINT(20) UNSIGNED,
4 | keyspace_id BIGINT(20) UNSIGNED,
5 | message VARCHAR(10000),
6 | PRIMARY KEY (page, time_created_ns)
7 | ) ENGINE=InnoDB
8 |
9 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/etcd-down.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This is an example script that tears down the etcd servers started by
18 | # etcd-up.sh.
19 |
20 | set -e
21 |
22 | script_root=`dirname "${BASH_SOURCE}"`
23 | source $script_root/env.sh
24 |
25 | CELLS=${CELLS:-'test'}
26 | cells=`echo $CELLS | tr ',' ' '`
27 |
28 | # Delete replication controllers
29 | for cell in 'global' $cells; do
30 | echo "Deleting etcd replicationcontroller for $cell cell..."
31 | $KUBECTL delete replicationcontroller etcd-$cell
32 |
33 | echo "Deleting etcd service for $cell cell..."
34 | $KUBECTL delete service etcd-$cell
35 | done
36 |
37 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/etcd-service-template.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: etcd-{{cell}}
5 | labels:
6 | component: etcd
7 | cell: {{cell}}
8 | app: vitess
9 | spec:
10 | ports:
11 | - port: 4001
12 | selector:
13 | component: etcd
14 | cell: {{cell}}
15 | app: vitess
16 |
17 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/guestbook-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: guestbook
5 | spec:
6 | replicas: 3
7 | template:
8 | metadata:
9 | labels:
10 | component: guestbook
11 | app: vitess
12 | spec:
13 | containers:
14 | - name: guestbook
15 | image: vitess/guestbook:v2.0.0-alpha5
16 | ports:
17 | - name: http-server
18 | containerPort: 8080
19 | resources:
20 | limits:
21 | memory: "128Mi"
22 | cpu: "100m"
23 |
24 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/guestbook-down.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This is an example script that stops guestbook.
18 |
19 | set -e
20 |
21 | script_root=`dirname "${BASH_SOURCE}"`
22 | source $script_root/env.sh
23 |
24 | echo "Deleting guestbook replicationcontroller..."
25 | $KUBECTL delete replicationcontroller guestbook
26 |
27 | echo "Deleting guestbook service..."
28 | $KUBECTL delete service guestbook
29 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/guestbook-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: guestbook
5 | labels:
6 | component: guestbook
7 | app: vitess
8 | spec:
9 | ports:
10 | - port: 80
11 | targetPort: http-server
12 | selector:
13 | component: guestbook
14 | app: vitess
15 | type: LoadBalancer
16 |
17 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/guestbook-up.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This is an example script that starts a guestbook replicationcontroller.
18 |
19 | set -e
20 |
21 | script_root=`dirname "${BASH_SOURCE}"`
22 | source $script_root/env.sh
23 |
24 | echo "Creating guestbook service..."
25 | $KUBECTL create -f guestbook-service.yaml
26 |
27 | echo "Creating guestbook replicationcontroller..."
28 | $KUBECTL create -f guestbook-controller.yaml
29 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/vitess-down.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | script_root=`dirname "${BASH_SOURCE}"`
18 | source $script_root/env.sh
19 |
20 | ./vtgate-down.sh
21 | SHARDS=$SHARDS CELLS=$CELLS TABLETS_PER_SHARD=$TABLETS_PER_SHARD ./vttablet-down.sh
22 | ./vtctld-down.sh
23 | ./etcd-down.sh
24 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/vtctld-down.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This is an example script that stops vtctld.
18 |
19 | set -e
20 |
21 | script_root=`dirname "${BASH_SOURCE}"`
22 | source $script_root/env.sh
23 |
24 | echo "Deleting vtctld replicationcontroller..."
25 | $KUBECTL delete replicationcontroller vtctld
26 |
27 | echo "Deleting vtctld service..."
28 | $KUBECTL delete service vtctld
29 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/vtctld-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: vtctld
5 | labels:
6 | component: vtctld
7 | app: vitess
8 | spec:
9 | ports:
10 | - port: 15000
11 | name: web
12 | targetPort: 15000
13 | nodePort: 30000
14 | - port: 15001
15 | name: grpc
16 | targetPort: 15001
17 | nodePort: 30001
18 | selector:
19 | component: vtctld
20 | app: vitess
21 | type: NodePort
22 |
23 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/vtctld-up.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This is an example script that starts vtctld.
18 |
19 | set -e
20 |
21 | script_root=`dirname "${BASH_SOURCE}"`
22 | source $script_root/env.sh
23 |
24 | echo "Creating vtctld service..."
25 | $KUBECTL create -f vtctld-service.yaml
26 |
27 | echo "Creating vtctld replicationcontroller..."
28 | # Expand template variables
29 | sed_script=""
30 | for var in backup_flags; do
31 | sed_script+="s,{{$var}},${!var},g;"
32 | done
33 |
34 | # Instantiate template and send to kubectl.
35 | cat vtctld-controller-template.yaml | sed -e "$sed_script" | $KUBECTL create -f -
36 |
37 | server=$(get_vtctld_addr)
38 | echo
39 | echo "vtctld address: http://$server"
40 |
41 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/vtgate-controller-template.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: vtgate
5 | spec:
6 | replicas: {{replicas}}
7 | template:
8 | metadata:
9 | labels:
10 | component: vtgate
11 | app: vitess
12 | spec:
13 | containers:
14 | - name: vtgate
15 | image: vitess/lite:v2.0.0-alpha5
16 | volumeMounts:
17 | - name: syslog
18 | mountPath: /dev/log
19 | - name: vtdataroot
20 | mountPath: /vt/vtdataroot
21 | resources:
22 | limits:
23 | memory: "512Mi"
24 | cpu: "500m"
25 | command:
26 | - sh
27 | - "-c"
28 | - >-
29 | mkdir -p $VTDATAROOT/tmp &&
30 | chown -R vitess /vt &&
31 | su -p -c "/vt/bin/vtgate
32 | -topo_implementation etcd
33 | -etcd_global_addrs http://$ETCD_GLOBAL_SERVICE_HOST:$ETCD_GLOBAL_SERVICE_PORT
34 | -log_dir $VTDATAROOT/tmp
35 | -alsologtostderr
36 | -port 15001
37 | -tablet_protocol grpc
38 | -service_map 'bsonrpc-vt-vtgateservice'
39 | -cell test" vitess
40 | volumes:
41 | - name: syslog
42 | hostPath: {path: /dev/log}
43 | - name: vtdataroot
44 | emptyDir: {}
45 |
46 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/vtgate-down.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This is an example script that stops vtgate.
18 |
19 | set -e
20 |
21 | script_root=`dirname "${BASH_SOURCE}"`
22 | source $script_root/env.sh
23 |
24 | echo "Deleting vtgate replicationcontroller..."
25 | $KUBECTL delete replicationcontroller vtgate
26 |
27 | echo "Deleting vtgate service..."
28 | $KUBECTL delete service vtgate
29 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/vtgate-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: vtgate
5 | labels:
6 | component: vtgate
7 | app: vitess
8 | spec:
9 | ports:
10 | - port: 15001
11 | selector:
12 | component: vtgate
13 | app: vitess
14 | type: LoadBalancer
15 |
16 |
--------------------------------------------------------------------------------
/_archived/storage/vitess/vtgate-up.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2015 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This is an example script that starts a vtgate replicationcontroller.
18 |
19 | set -e
20 |
21 | script_root=`dirname "${BASH_SOURCE}"`
22 | source $script_root/env.sh
23 |
24 | VTGATE_REPLICAS=${VTGATE_REPLICAS:-3}
25 | VTGATE_TEMPLATE=${VTGATE_TEMPLATE:-'vtgate-controller-template.yaml'}
26 |
27 | replicas=$VTGATE_REPLICAS
28 |
29 | echo "Creating vtgate service..."
30 | $KUBECTL create -f vtgate-service.yaml
31 |
32 | sed_script=""
33 | for var in replicas; do
34 | sed_script+="s,{{$var}},${!var},g;"
35 | done
36 |
37 | echo "Creating vtgate replicationcontroller..."
38 | cat $VTGATE_TEMPLATE | sed -e "$sed_script" | $KUBECTL create -f -
39 |
--------------------------------------------------------------------------------
/_archived/storm/storm-nimbus-service.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Service",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "nimbus",
6 | "labels": {
7 | "name": "nimbus"
8 | }
9 | },
10 | "spec": {
11 | "ports": [
12 | {
13 | "port": 6627
14 | }
15 | ],
16 | "selector": {
17 | "name": "nimbus"
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/_archived/storm/storm-nimbus.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Pod",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "nimbus",
6 | "labels": {
7 | "name": "nimbus"
8 | }
9 | },
10 | "spec": {
11 | "containers": [
12 | {
13 | "name": "nimbus",
14 | "image": "mattf/storm-nimbus",
15 | "ports": [
16 | {
17 | "containerPort": 6627
18 | }
19 | ],
20 | "resources": {
21 | "limits": {
22 | "cpu": "100m"
23 | }
24 | }
25 | }
26 | ]
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/_archived/storm/storm-worker-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: storm-worker-controller
5 | labels:
6 | name: storm-worker
7 | spec:
8 | replicas: 2
9 | selector:
10 | matchLabels:
11 | name: storm-worker
12 | uses: nimbus
13 | template:
14 | metadata:
15 | labels:
16 | name: storm-worker
17 | uses: nimbus
18 | spec:
19 | containers:
20 | - name: storm-worke
21 | image: mattf/storm-worker
22 | resources:
23 | limits:
24 | cpu: 200m
25 | memory: 500Mi
26 | requests:
27 | cpu: 100m
28 | memory: 100Mi
29 | ports:
30 | - hostPort: 6700
31 | containerPort: 6700
32 | - hostPort: 6701
33 | containerPort: 6701
34 | - hostPort: 6702
35 | containerPort: 6702
36 | - hostPort: 6703
37 | containerPort: 6703
38 |
--------------------------------------------------------------------------------
/_archived/storm/zookeeper-service.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Service",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "zookeeper",
6 | "labels": {
7 | "name": "zookeeper"
8 | }
9 | },
10 | "spec": {
11 | "ports": [
12 | {
13 | "port": 2181
14 | }
15 | ],
16 | "selector": {
17 | "name": "zookeeper"
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/_archived/storm/zookeeper.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Pod",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "zookeeper",
6 | "labels": {
7 | "name": "zookeeper"
8 | }
9 | },
10 | "spec": {
11 | "containers": [
12 | {
13 | "name": "zookeeper",
14 | "image": "mattf/zookeeper",
15 | "ports": [
16 | {
17 | "containerPort": 2181
18 | }
19 | ],
20 | "resources": {
21 | "limits": {
22 | "cpu": "100m"
23 | }
24 | }
25 | }
26 | ]
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/_archived/sysdig-cloud/README.md:
--------------------------------------------------------------------------------
1 | [Sysdig Cloud](http://www.sysdig.com/) is a monitoring, alerting, and troubleshooting platform designed to natively support containerized and service-oriented applications.
2 |
3 | Sysdig Cloud comes with built-in, first class support for Kubernetes. In order to instrument your Kubernetes environment with Sysdig Cloud, you simply need to install the Sysdig Cloud agent container on each underlying host in your Kubernetes cluster. Sysdig Cloud will automatically begin monitoring all of your hosts, apps, pods, and services, and will also automatically connect to the Kubernetes API to pull relevant metadata about your environment.
4 |
5 | # Example Installation Files
6 |
7 | Provided here are two example sysdig.yaml files that can be used to automatically deploy the Sysdig Cloud agent container across a Kubernetes cluster.
8 |
9 | The recommended method is using daemon sets - minimum kubernetes version 1.1.1.
10 |
11 | If daemon sets are not available, then the replication controller method can be used (based on [this hack](https://stackoverflow.com/questions/33377054/how-to-require-one-pod-per-minion-kublet-when-configuring-a-replication-controll/33381862#33381862 )).
12 |
13 | # Latest Files
14 |
15 | See here for the latest maintained and updated versions of these example files:
16 | https://github.com/draios/sysdig-cloud-scripts/tree/master/agent_deploy/kubernetes
17 |
18 | # Install instructions
19 |
20 | Please see the Sysdig Cloud support site for the latest documentation:
21 | http://support.sysdigcloud.com/hc/en-us/sections/200959909
22 |
23 |
--------------------------------------------------------------------------------
/_archived/volumes/aws_ebs/README.md:
--------------------------------------------------------------------------------
1 | This is a simple web server pod which serves HTML from an AWS EBS
2 | volume.
3 |
4 | If you did not use kube-up script, make sure that your masters have the following IAM permissions ([Amazon IAM Roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#create-iam-role-console)):
5 |
6 | ```shell
7 | ec2:AttachVolume
8 | ec2:DetachVolume
9 | ec2:DescribeInstances
10 | ec2:DescribeVolumes
11 | ```
12 |
13 | Create a volume in the same region as your node.
14 |
15 | Add your volume information in the pod description file aws-ebs-web.yaml then create the pod:
16 |
17 | ```shell
18 | $ kubectl create -f examples/volumes/aws_ebs/aws-ebs-web.yaml
19 | ```
20 |
21 | Add some data to the volume if is empty:
22 |
23 | ```sh
24 | $ echo "Hello World" >& /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/{Region}/{Volume ID}/index.html
25 | ```
26 |
27 | You should now be able to query your web server:
28 |
29 | ```sh
30 | $ curl
31 | $ Hello World
32 | ```
33 |
34 |
--------------------------------------------------------------------------------
/_archived/volumes/aws_ebs/aws-ebs-web.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: aws-web
5 | spec:
6 | containers:
7 | - name: web
8 | image: nginx
9 | ports:
10 | - name: web
11 | containerPort: 80
12 | protocol: tcp
13 | volumeMounts:
14 | - name: html-volume
15 | mountPath: "/usr/share/nginx/html"
16 | volumes:
17 | - name: html-volume
18 | awsElasticBlockStore:
19 | # Enter the volume ID below
20 | volumeID: volume_ID
21 | fsType: ext4
22 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/README.md:
--------------------------------------------------------------------------------
1 | # How to Use it?
2 |
3 | On Azure VM, create a Pod using the volume spec based on [azure](azure.yaml).
4 |
5 | In the pod, you need to provide the following information:
6 |
7 | - *diskName*: (required) the name of the VHD blob object OR the name of an Azure managed data disk if Kind is Managed.
8 | - *diskURI*: (required) the URI of the vhd blob object OR the resourceID of an Azure managed data disk if Kind is Managed.
9 | - *kind*: (optional) kind of disk. Must be one of Shared (multiple disks per storage account), Dedicated (single blob disk per storage account), or Managed (Azure managed data disk). Default is Shared.
10 | - *cachingMode*: (optional) disk caching mode. Must be one of None, ReadOnly, or ReadWrite. Default is None.
11 | - *fsType*: (optional) the filesystem type to mount. Default is ext4.
12 | - *readOnly*: (optional) whether the filesystem is used as readOnly. Default is false.
13 |
14 |
15 | Launch the Pod:
16 |
17 | ```console
18 | # kubectl create -f examples/staging/volumes/azure_disk/azure.yaml
19 | ```
20 |
21 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/azure.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: azure
5 | spec:
6 | containers:
7 | - image: kubernetes/pause
8 | name: azure
9 | volumeMounts:
10 | - name: azure
11 | mountPath: /mnt/azure
12 | volumes:
13 | - name: azure
14 | azureDisk:
15 | diskName: test.vhd
16 | diskURI: https://someaccount.blob.microsoft.net/vhds/test.vhd
17 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/account-specified-hdd/pod-uses-account-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: Pod
2 | apiVersion: v1
3 | metadata:
4 | name: pod-uses-account-hdd-5g
5 | labels:
6 | name: storage
7 | spec:
8 | containers:
9 | - image: nginx
10 | name: az-c-01
11 | command:
12 | - /bin/sh
13 | - -c
14 | - while true; do echo $(date) >> /mnt/blobdisk/outfile; sleep 1; done
15 | volumeMounts:
16 | - name: blobdisk01
17 | mountPath: /mnt/blobdisk
18 | volumes:
19 | - name: blobdisk01
20 | persistentVolumeClaim:
21 | claimName: pv-dd-account-hdd-5g
22 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/account-specified-hdd/pvc-on-account-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pv-dd-account-hdd-5g
5 | annotations:
6 | volume.beta.kubernetes.io/storage-class: accounthdd
7 | spec:
8 | accessModes:
9 | - ReadWriteOnce
10 | resources:
11 | requests:
12 | storage: 5Gi
13 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/account-specified-hdd/storageclass-account-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1beta1
3 | metadata:
4 | name: accounthdd
5 | provisioner: kubernetes.io/azure-disk
6 | parameters:
7 | skuname: Standard_LRS
8 | location: westus
9 | storageAccount: azuretestx
10 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/dedicated-hdd/pod-uses-dedicated-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: Pod
2 | apiVersion: v1
3 | metadata:
4 | name: pod-uses-dedicated-hdd-5g
5 | labels:
6 | name: storage
7 | spec:
8 | containers:
9 | - image: nginx
10 | name: az-c-01
11 | command:
12 | - /bin/sh
13 | - -c
14 | - while true; do echo $(date) >> /mnt/blobdisk/outfile; sleep 1; done
15 | volumeMounts:
16 | - name: blobdisk01
17 | mountPath: /mnt/blobdisk
18 | volumes:
19 | - name: blobdisk01
20 | persistentVolumeClaim:
21 | claimName: pv-dd-dedicated-hdd-5g
22 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/dedicated-hdd/pvc-on-dedicated-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pv-dd-dedicated-hdd-5g
5 | annotations:
6 | volume.beta.kubernetes.io/storage-class: dedicatedhdd
7 | spec:
8 | accessModes:
9 | - ReadWriteOnce
10 | resources:
11 | requests:
12 | storage: 5Gi
13 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/dedicated-hdd/storageclass-dedicated-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1beta1
3 | metadata:
4 | name: dedicatedhdd
5 | provisioner: kubernetes.io/azure-disk
6 | parameters:
7 | skuname: Standard_LRS
8 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/shared-hdd/pod-uses-shared-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: Pod
2 | apiVersion: v1
3 | metadata:
4 | name: pod-uses-shared-hdd-5g
5 | labels:
6 | name: storage
7 | spec:
8 | containers:
9 | - image: nginx
10 | name: az-c-01
11 | command:
12 | - /bin/sh
13 | - -c
14 | - while true; do echo $(date) >> /mnt/blobdisk/outfile; sleep 1; done
15 | volumeMounts:
16 | - name: blobdisk01
17 | mountPath: /mnt/blobdisk
18 | volumes:
19 | - name: blobdisk01
20 | persistentVolumeClaim:
21 | claimName: pv-dd-shared-hdd-5g
22 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/shared-hdd/pvc-on-shared-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pv-dd-shared-hdd-5g
5 | annotations:
6 | volume.beta.kubernetes.io/storage-class: sharedhdd
7 | spec:
8 | accessModes:
9 | - ReadWriteOnce
10 | resources:
11 | requests:
12 | storage: 5Gi
13 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/shared-hdd/storageclass-shared-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1beta1
3 | metadata:
4 | name: sharedhdd
5 | provisioner: kubernetes.io/azure-disk
6 | parameters:
7 | skuname: Standard_LRS
8 | kind: Shared
9 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/shared-ssd/pod-uses-shared-ssd.yaml:
--------------------------------------------------------------------------------
1 | kind: Pod
2 | apiVersion: v1
3 | metadata:
4 | name: pod-uses-shared-ssd-5g
5 | labels:
6 | name: storage
7 | spec:
8 | containers:
9 | - image: nginx
10 | name: az-c-01
11 | command:
12 | - /bin/sh
13 | - -c
14 | - while true; do echo $(date) >> /mnt/blobdisk/outfile; sleep 1; done
15 | volumeMounts:
16 | - name: blobdisk01
17 | mountPath: /mnt/blobdisk
18 | volumes:
19 | - name: blobdisk01
20 | persistentVolumeClaim:
21 | claimName: pv-dd-shared-ssd-5g
22 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/shared-ssd/pvc-on-shared-ssd.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pv-dd-shared-ssd-5g
5 | annotations:
6 | volume.beta.kubernetes.io/storage-class: sharedssd
7 | spec:
8 | accessModes:
9 | - ReadWriteOnce
10 | resources:
11 | requests:
12 | storage: 5Gi
13 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/blob-based-disk/shared-ssd/storageclass-shared-ssd.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1beta1
3 | metadata:
4 | name: sharedssd
5 | provisioner: kubernetes.io/azure-disk
6 | parameters:
7 | skuname: Premium_LRS
8 | kind: Shared
9 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/managed-disk/managed-hdd/pod-uses-managed-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: Pod
2 | apiVersion: v1
3 | metadata:
4 | name: pod-uses-managed-hdd-5g
5 | labels:
6 | name: storage
7 | spec:
8 | containers:
9 | - image: nginx
10 | name: az-c-01
11 | command:
12 | - /bin/sh
13 | - -c
14 | - while true; do echo $(date) >> /mnt/managed/outfile; sleep 1; done
15 | volumeMounts:
16 | - name: managed01
17 | mountPath: /mnt/managed
18 | volumes:
19 | - name: managed01
20 | persistentVolumeClaim:
21 | claimName: dd-managed-hdd-5g
22 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/managed-disk/managed-hdd/pvc-on-managed-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: dd-managed-hdd-5g
5 | annotations:
6 | volume.beta.kubernetes.io/storage-class: managedhdd
7 | spec:
8 | accessModes:
9 | - ReadWriteOnce
10 | resources:
11 | requests:
12 | storage: 5Gi
13 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/managed-disk/managed-hdd/storageclass-managed-hdd.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1beta1
3 | metadata:
4 | name: managedhdd
5 | provisioner: kubernetes.io/azure-disk
6 | parameters:
7 | storageaccounttype: Standard_LRS
8 | kind: Managed
9 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/managed-disk/managed-ssd/pod-uses-managed-ssd.yaml:
--------------------------------------------------------------------------------
1 | kind: Pod
2 | apiVersion: v1
3 | metadata:
4 | name: pod-uses-managed-ssd-5g
5 | labels:
6 | name: storage
7 | spec:
8 | containers:
9 | - image: nginx
10 | name: az-c-01
11 | command:
12 | - /bin/sh
13 | - -c
14 | - while true; do echo $(date) >> /mnt/managed/outfile; sleep 1; done
15 | volumeMounts:
16 | - name: managed01
17 | mountPath: /mnt/managed
18 | volumes:
19 | - name: managed01
20 | persistentVolumeClaim:
21 | claimName: dd-managed-ssd-5g
22 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/managed-disk/managed-ssd/pvc-on-managed-ssd.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: dd-managed-ssd-5g
5 | annotations:
6 | volume.beta.kubernetes.io/storage-class: managedssd
7 | spec:
8 | accessModes:
9 | - ReadWriteOnce
10 | resources:
11 | requests:
12 | storage: 5Gi
13 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/claim/managed-disk/managed-ssd/storageclass-managed-ssd.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1beta1
3 | metadata:
4 | name: managedssd
5 | provisioner: kubernetes.io/azure-disk
6 | parameters:
7 | storageaccounttype: Premium_LRS
8 | kind: Managed
9 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_disk/static-provisioning/managed-disk/pod-uses-existing-managed-disk.yaml:
--------------------------------------------------------------------------------
1 | kind: Pod
2 | apiVersion: v1
3 | metadata:
4 | name: pod-uses-managed-ssd-5g
5 | labels:
6 | name: storage
7 | spec:
8 | containers:
9 | - image: nginx
10 | name: az-c-01
11 | command:
12 | - /bin/sh
13 | - -c
14 | - while true; do echo $(date) >> /mnt/managed/outfile; sleep 1; done
15 | volumeMounts:
16 | - name: managed01
17 | mountPath: /mnt/managed
18 | volumes:
19 | - name: managed01
20 | azureDisk:
21 | kind: Managed
22 | diskName: myDisk
23 | diskURI: /subscriptions//resourceGroups//providers/Microsoft.Compute/disks/
24 |
25 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_file/azure-2.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: azure-2
5 | spec:
6 | containers:
7 | - image: kubernetes/pause
8 | name: azure-2
9 | volumeMounts:
10 | - name: azure
11 | mountPath: /mnt/azure
12 | volumes:
13 | - name: azure
14 | persistentVolumeClaim:
15 | claimName: sample-storage-claim
16 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_file/azure-pv.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolume
3 | metadata:
4 | name: sample-storage
5 | # The label is used for matching the exact claim
6 | labels:
7 | usage: sample-storage
8 | spec:
9 | capacity:
10 | storage: 10Gi
11 | accessModes:
12 | - ReadWriteMany
13 | persistentVolumeReclaimPolicy: Retain
14 | azureFile:
15 | # Replace with your secret name
16 | secretName: azure-secret
17 | # Replace with correct storage share name
18 | shareName: k8stest
19 | # In case the secret is stored in a different namespace
20 | #secretNamespace: default
21 | readOnly: false
22 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_file/azure-pvc.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: sample-storage-claim
5 | # Set this annotation to NOT let Kubernetes automatically create
6 | # a persistent volume for this volume claim.
7 | annotations:
8 | volume.beta.kubernetes.io/storage-class: ""
9 | spec:
10 | accessModes:
11 | - ReadWriteMany
12 | resources:
13 | requests:
14 | storage: 10Gi
15 | selector:
16 | # To make sure we match the claim with the exact volume, match the label
17 | matchLabels:
18 | usage: sample-storage
19 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_file/azure.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: azure
5 | spec:
6 | containers:
7 | - image: kubernetes/pause
8 | name: azure
9 | volumeMounts:
10 | - name: azure
11 | mountPath: /mnt/azure
12 | volumes:
13 | - name: azure
14 | azureFile:
15 | secretName: azure-secret
16 | shareName: k8stest
17 | readOnly: false
18 |
--------------------------------------------------------------------------------
/_archived/volumes/azure_file/secret/azure-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: azure-secret
5 | type: Opaque
6 | data:
7 | azurestorageaccountname: azhzdGVzdA==
8 | azurestorageaccountkey: eElGMXpKYm5ub2pGTE1Ta0JwNTBteDAyckhzTUsyc2pVN21GdDRMMTNob0I3ZHJBYUo4akQ2K0E0NDNqSm9nVjd5MkZVT2hRQ1dQbU02WWFOSHk3cWc9PQ==
9 |
--------------------------------------------------------------------------------
/_archived/volumes/cephfs/cephfs-with-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: cephfs2
5 | spec:
6 | containers:
7 | - name: cephfs-rw
8 | image: kubernetes/pause
9 | volumeMounts:
10 | - mountPath: "/mnt/cephfs"
11 | name: cephfs
12 | volumes:
13 | - name: cephfs
14 | cephfs:
15 | monitors:
16 | - 10.16.154.78:6789
17 | - 10.16.154.82:6789
18 | - 10.16.154.83:6789
19 | user: admin
20 | secretRef:
21 | name: ceph-secret
22 | readOnly: true
23 |
--------------------------------------------------------------------------------
/_archived/volumes/cephfs/cephfs.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: cephfs
5 | spec:
6 | containers:
7 | - name: cephfs-rw
8 | image: kubernetes/pause
9 | volumeMounts:
10 | - mountPath: "/mnt/cephfs"
11 | name: cephfs
12 | volumes:
13 | - name: cephfs
14 | cephfs:
15 | monitors:
16 | - 10.16.154.78:6789
17 | - 10.16.154.82:6789
18 | - 10.16.154.83:6789
19 | # by default the path is /, but you can override and mount a specific path of the filesystem by using the path attribute
20 | # path: /some/path/in/side/cephfs
21 | user: admin
22 | secretFile: "/etc/ceph/admin.secret"
23 | readOnly: true
24 |
--------------------------------------------------------------------------------
/_archived/volumes/cephfs/secret/ceph-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: ceph-secret
5 | stringData:
6 | key: QVFCMTZWMVZvRjVtRXhBQTVrQ1FzN2JCajhWVUxSdzI2Qzg0SEE9PQ== # the base64-encoded string of the already-base64-encoded key `ceph auth get-key` outputs
7 |
--------------------------------------------------------------------------------
/_archived/volumes/cinder/README.md:
--------------------------------------------------------------------------------
1 | This is a simple web server pod which serves HTML from an Cinder volume.
2 |
3 | Create a volume in the same tenant and zone as your node.
4 |
5 | Add your volume information in the pod description file cinder-web.yaml then create the pod:
6 |
7 | ```shell
8 | $ kubectl create -f examples/volumes/cinder/cinder-web.yaml
9 | ```
10 |
11 | Add some data to the volume if is empty:
12 |
13 | ```sh
14 | $ echo "Hello World" >& /var/lib/kubelet/plugins/kubernetes.io/cinder/mounts/{Volume ID}/index.html
15 | ```
16 |
17 | You should now be able to query your web server:
18 |
19 | ```sh
20 | $ curl
21 | $ Hello World
22 | ```
23 |
24 |
--------------------------------------------------------------------------------
/_archived/volumes/cinder/cinder-web.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: cinder-web
5 | spec:
6 | containers:
7 | - name: web
8 | image: nginx
9 | ports:
10 | - name: web
11 | containerPort: 80
12 | protocol: tcp
13 | volumeMounts:
14 | - name: html-volume
15 | mountPath: "/usr/share/nginx/html"
16 | volumes:
17 | - name: html-volume
18 | cinder:
19 | # Enter the volume ID below
20 | volumeID: volume_ID
21 | fsType: ext4
22 |
--------------------------------------------------------------------------------
/_archived/volumes/fibre_channel/fc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: fibre-channel-example-pod
5 | spec:
6 | containers:
7 | - image: kubernetes/pause
8 | name: fc
9 | volumeMounts:
10 | - name: fc-vol
11 | mountPath: /mnt/fc
12 | volumes:
13 | - name: fc-vol
14 | fc:
15 | targetWWNs:
16 | -
17 | lun:
18 | fsType: ext4
19 | readOnly: true
20 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/README.md:
--------------------------------------------------------------------------------
1 | Please refer to https://github.com/kubernetes/community/blob/master/contributors/devel/sig-storage/flexvolume.md for documentation.
2 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/deploy/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM busybox
16 | WORKDIR .
17 |
18 | # TODO Change to your desired driver.
19 | COPY ./drivers/dummy /dummy
20 |
21 | COPY deploy.sh /deploy.sh
22 | CMD /bin/sh /deploy.sh
23 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/deploy/README.md:
--------------------------------------------------------------------------------
1 | This directory contains an example of the DaemonSet Flexvolume driver deployment method. See documentation [here](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/flexvolume-deployment.md#recommended-driver-deployment-method).
2 |
3 | Steps to use the DaemonSet deployment method:
4 | 1. Copy the Flexvolume driver to `drivers` directory. To get a basic example running, copy the `dummy` driver from the parent directory.
5 | 1. If you'd like to just get a basic example running, you could skip this step. Otherwise, change the places marked with `TODO` in all files.
6 | 1. Build the deployment Docker image and upload to your container registry.
7 | 1. Create the DaemonSet.
8 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/deploy/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright 2018 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | set -o errexit
18 | set -o pipefail
19 |
20 | # TODO change to your desired driver.
21 | VENDOR=${VENDOR:-k8s}
22 | DRIVER=${DRIVER:-dummy}
23 |
24 | # Assuming the single driver file is located at /$DRIVER inside the DaemonSet image.
25 |
26 | driver_dir=$VENDOR${VENDOR:+"~"}${DRIVER}
27 | if [ ! -d "/flexmnt/$driver_dir" ]; then
28 | mkdir "/flexmnt/$driver_dir"
29 | fi
30 |
31 | tmp_driver=.tmp_$DRIVER
32 | cp "/$DRIVER" "/flexmnt/$driver_dir/$tmp_driver"
33 | mv -f "/flexmnt/$driver_dir/$tmp_driver" "/flexmnt/$driver_dir/$DRIVER"
34 |
35 | while : ; do
36 | sleep 3600
37 | done
38 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/deploy/ds.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: extensions/v1beta1
2 | kind: DaemonSet
3 | metadata:
4 | name: flex-ds
5 | spec:
6 | template:
7 | metadata:
8 | name: flex-deploy
9 | labels:
10 | app: flex-deploy
11 | spec:
12 | containers:
13 | # TODO Change to your container registry.
14 | - image: ""
15 | name: flex-deploy
16 | securityContext:
17 | privileged: true
18 | volumeMounts:
19 | - mountPath: /flexmnt
20 | name: flexvolume-mount
21 | volumes:
22 | - name: flexvolume-mount
23 | hostPath:
24 | # TODO Change to the Flexvolume plugin directory of your cluster.
25 | path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/
26 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/nginx-dummy-attachable.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: nginx-dummy-attachable
5 | namespace: default
6 | spec:
7 | containers:
8 | - name: nginx-dummy-attachable
9 | image: nginx
10 | volumeMounts:
11 | - name: dummy-attachable
12 | mountPath: /data
13 | ports:
14 | - containerPort: 80
15 | volumes:
16 | - name: dummy-attachable
17 | flexVolume:
18 | driver: "k8s/dummy-attachable"
19 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/nginx-dummy.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: nginx-dummy
5 | namespace: default
6 | spec:
7 | containers:
8 | - name: nginx-dummy
9 | image: nginx
10 | volumeMounts:
11 | - name: dummy
12 | mountPath: /data
13 | ports:
14 | - containerPort: 80
15 | volumes:
16 | - name: dummy
17 | flexVolume:
18 | driver: "k8s/dummy"
19 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/nginx-lvm.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: nginx
5 | namespace: default
6 | spec:
7 | containers:
8 | - name: nginx
9 | image: nginx
10 | volumeMounts:
11 | - name: test
12 | mountPath: /data
13 | ports:
14 | - containerPort: 80
15 | volumes:
16 | - name: test
17 | flexVolume:
18 | driver: "kubernetes.io/lvm"
19 | fsType: "ext4"
20 | options:
21 | volumeID: "vol1"
22 | size: "1000m"
23 | volumegroup: "kube_vg"
24 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/nginx-nfs.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: nginx-nfs
5 | namespace: default
6 | spec:
7 | containers:
8 | - name: nginx-nfs
9 | image: nginx
10 | volumeMounts:
11 | - name: test
12 | mountPath: /data
13 | ports:
14 | - containerPort: 80
15 | volumes:
16 | - name: test
17 | flexVolume:
18 | driver: "k8s/nfs"
19 | fsType: "nfs"
20 | options:
21 | server: "172.16.0.25"
22 | share: "dws_nas_scratch"
23 |
--------------------------------------------------------------------------------
/_archived/volumes/flexvolume/nginx.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: nginx
5 | namespace: default
6 | spec:
7 | containers:
8 | - name: nginx
9 | image: nginx
10 | volumeMounts:
11 | - name: test
12 | mountPath: /data
13 | ports:
14 | - containerPort: 80
15 | volumes:
16 | - name: test
17 | flexVolume:
18 | driver: "kubernetes.io/lvm"
19 | fsType: "ext4"
20 | options:
21 | volumeID: "vol1"
22 | size: "1000m"
23 | volumegroup: "kube_vg"
24 |
--------------------------------------------------------------------------------
/_archived/volumes/flocker/flocker-pod-with-rc.yml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: flocker-ghost
5 | labels:
6 | app: flocker-ghost
7 | spec:
8 | ports:
9 | # the port that this service should serve on
10 | - port: 80
11 | targetPort: 80
12 | selector:
13 | app: flocker-ghost
14 | ---
15 | apiVersion: v1
16 | kind: ReplicationController
17 | metadata:
18 | name: flocker-ghost
19 | # these labels can be applied automatically
20 | # from the labels in the pod template if not set
21 | labels:
22 | purpose: demo
23 | spec:
24 | replicas: 1
25 | template:
26 | metadata:
27 | labels:
28 | app: flocker-ghost
29 | spec:
30 | containers:
31 | - name: flocker-ghost
32 | image: ghost:0.7.1
33 | env:
34 | - name: GET_HOSTS_FROM
35 | value: dns
36 | ports:
37 | - containerPort: 2368
38 | hostPort: 80
39 | protocol: TCP
40 | volumeMounts:
41 | # name must match the volume name below
42 | - name: ghost-data
43 | mountPath: "/var/lib/ghost"
44 | volumes:
45 | - name: ghost-data
46 | flocker:
47 | datasetName: my-flocker-vol
48 |
--------------------------------------------------------------------------------
/_archived/volumes/flocker/flocker-pod.yml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: flocker-web
5 | spec:
6 | containers:
7 | - name: web
8 | image: nginx
9 | ports:
10 | - name: web
11 | containerPort: 80
12 | volumeMounts:
13 | # name must match the volume name below
14 | - name: www-root
15 | mountPath: "/usr/share/nginx/html"
16 | volumes:
17 | - name: www-root
18 | flocker:
19 | datasetName: my-flocker-vol
20 |
--------------------------------------------------------------------------------
/_archived/volumes/glusterfs/glusterfs-endpoints.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Endpoints
3 | metadata:
4 | name: glusterfs-cluster
5 | subsets:
6 | - addresses:
7 | - ip: 10.240.106.152
8 | ports:
9 | - port: 1
10 | - addresses:
11 | - ip: 10.240.79.157
12 | ports:
13 | - port: 1
14 |
--------------------------------------------------------------------------------
/_archived/volumes/glusterfs/glusterfs-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: glusterfs
5 | spec:
6 | containers:
7 | - name: glusterfs
8 | image: nginx
9 | volumeMounts:
10 | - mountPath: "/mnt/glusterfs"
11 | name: glusterfsvol
12 | volumes:
13 | - name: glusterfsvol
14 | glusterfs:
15 | endpoints: glusterfs-cluster
16 | path: kube_vol
17 | readOnly: true
18 |
--------------------------------------------------------------------------------
/_archived/volumes/glusterfs/glusterfs-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: glusterfs-cluster
5 | spec:
6 | ports:
7 | - port: 1
8 |
--------------------------------------------------------------------------------
/_archived/volumes/iscsi/chap-secret.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | apiVersion: v1
3 | kind: Secret
4 | metadata:
5 | name: chap-secret
6 | type: "kubernetes.io/iscsi-chap"
7 | data:
8 | discovery.sendtargets.auth.username: dXNlcg==
9 | discovery.sendtargets.auth.password: ZGVtbw==
10 | discovery.sendtargets.auth.username_in: bXVzZXI=
11 | discovery.sendtargets.auth.password_in: bXBhc3M=
12 | node.session.auth.username: dXNlcm5hbWU=
13 | node.session.auth.password: cGFzc3dvcmQ=
14 | node.session.auth.username_in: bXVzZXIy
15 | node.session.auth.password_in: bXBhc3My
16 |
--------------------------------------------------------------------------------
/_archived/volumes/iscsi/iscsi-chap.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | apiVersion: v1
3 | kind: Pod
4 | metadata:
5 | name: iscsipd
6 | spec:
7 | containers:
8 | - name: iscsipd-ro
9 | image: kubernetes/pause
10 | volumeMounts:
11 | - mountPath: "/mnt/iscsipd"
12 | name: iscsivol
13 | volumes:
14 | - name: iscsivol
15 | iscsi:
16 | targetPortal: 127.0.0.1
17 | iqn: iqn.2015-02.example.com:test
18 | lun: 0
19 | fsType: ext4
20 | readOnly: true
21 | chapAuthDiscovery: true
22 | chapAuthSession: true
23 | secretRef:
24 | name: chap-secret
25 |
--------------------------------------------------------------------------------
/_archived/volumes/iscsi/iscsi.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | apiVersion: v1
3 | kind: Pod
4 | metadata:
5 | name: iscsipd
6 | spec:
7 | containers:
8 | - name: iscsipd-rw
9 | image: kubernetes/pause
10 | volumeMounts:
11 | - mountPath: "/mnt/iscsipd"
12 | name: iscsipd-rw
13 | volumes:
14 | - name: iscsipd-rw
15 | iscsi:
16 | targetPortal: 10.0.2.15:3260
17 | portals: ['10.0.2.16:3260', '10.0.2.17:3260']
18 | iqn: iqn.2001-04.com.example:storage.kube.sys1.xyz
19 | lun: 0
20 | fsType: ext4
21 | readOnly: true
22 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-busybox-deployment.yaml:
--------------------------------------------------------------------------------
1 | # This mounts the nfs volume claim into /mnt and continuously
2 | # overwrites /mnt/index.html with the time and hostname of the pod.
3 |
4 | apiVersion: apps/v1
5 | kind: Deployment
6 | metadata:
7 | name: nfs-busybox
8 | spec:
9 | replicas: 2
10 | selector:
11 | matchLabels:
12 | name: nfs-busybox
13 | template:
14 | metadata:
15 | labels:
16 | name: nfs-busybox
17 | spec:
18 | containers:
19 | - image: busybox
20 | command:
21 | - sh
22 | - -c
23 | - 'while true; do date > /mnt/index.html; hostname >> /mnt/index.html; sleep $(($RANDOM % 5 + 5)); done'
24 | imagePullPolicy: IfNotPresent
25 | name: busybox
26 | volumeMounts:
27 | # name must match the volume name below
28 | - name: nfs
29 | mountPath: "/mnt"
30 | volumes:
31 | - name: nfs
32 | persistentVolumeClaim:
33 | claimName: nfs
34 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-data/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM centos
16 | RUN yum -y install /usr/bin/ps nfs-utils && yum clean all
17 | RUN mkdir -p /exports
18 | ADD run_nfs.sh /usr/local/bin/
19 | ADD index.html /tmp/index.html
20 | RUN chmod 644 /tmp/index.html
21 |
22 | # expose mountd 20048/tcp and nfsd 2049/tcp and rpcbind 111/tcp
23 | EXPOSE 2049/tcp 20048/tcp 111/tcp 111/udp
24 |
25 | ENTRYPOINT ["/usr/local/bin/run_nfs.sh", "/exports"]
26 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-data/README.md:
--------------------------------------------------------------------------------
1 | # NFS-exporter container with a file
2 |
3 | This container exports /exports with index.html in it via NFS. Based on
4 | ../exports. Since some Linux kernels have issues running NFSv4 daemons in containers,
5 | only NFSv3 is opened in this container.
6 |
7 | Available as `gcr.io/google-samples/nfs-server`
8 |
9 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-data/index.html:
--------------------------------------------------------------------------------
1 | Hello world!
2 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-pv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubernetes/examples/209452cc17f0632f06fa0a1f79060884b8277968/_archived/volumes/nfs/nfs-pv.png
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-pv.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolume
3 | metadata:
4 | name: nfs
5 | spec:
6 | capacity:
7 | storage: 1Mi
8 | accessModes:
9 | - ReadWriteMany
10 | nfs:
11 | server: nfs-server.default.svc.cluster.local
12 | path: "/"
13 | mountOptions:
14 | - nfsvers=4.2
15 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-pvc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | name: nfs
5 | spec:
6 | accessModes:
7 | - ReadWriteMany
8 | storageClassName: ""
9 | resources:
10 | requests:
11 | storage: 1Mi
12 | volumeName: nfs
13 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-server-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: nfs-server
5 | spec:
6 | replicas: 1
7 | selector:
8 | matchLabels:
9 | role: nfs-server
10 | template:
11 | metadata:
12 | labels:
13 | role: nfs-server
14 | spec:
15 | containers:
16 | - name: nfs-server
17 | image: registry.k8s.io/volume-nfs:0.8
18 | ports:
19 | - name: nfs
20 | containerPort: 2049
21 | - name: mountd
22 | containerPort: 20048
23 | - name: rpcbind
24 | containerPort: 111
25 | securityContext:
26 | privileged: true
27 | volumeMounts:
28 | - mountPath: /exports
29 | name: mypvc
30 | volumes:
31 | - name: mypvc
32 | persistentVolumeClaim:
33 | claimName: nfs-pv-provisioning-demo
34 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-server-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: nfs-server
5 | spec:
6 | ports:
7 | - name: nfs
8 | port: 2049
9 | - name: mountd
10 | port: 20048
11 | - name: rpcbind
12 | port: 111
13 | selector:
14 | role: nfs-server
15 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-web-deployment.yaml:
--------------------------------------------------------------------------------
1 | # This pod mounts the nfs volume claim into /usr/share/nginx/html and
2 | # serves a simple web page.
3 |
4 | apiVersion: apps/v1
5 | kind: Deployment
6 | metadata:
7 | name: nfs-web
8 | spec:
9 | replicas: 2
10 | selector:
11 | matchLabels:
12 | role: web-frontend
13 | template:
14 | metadata:
15 | labels:
16 | role: web-frontend
17 | spec:
18 | containers:
19 | - name: web
20 | image: nginx
21 | ports:
22 | - name: web
23 | containerPort: 80
24 | volumeMounts:
25 | # name must match the volume name below
26 | - name: nfs
27 | mountPath: "/usr/share/nginx/html"
28 | volumes:
29 | - name: nfs
30 | persistentVolumeClaim:
31 | claimName: nfs
32 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/nfs-web-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: nfs-web
5 | spec:
6 | ports:
7 | - port: 80
8 | selector:
9 | role: web-frontend
10 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/provisioner/nfs-server-azure-pv.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | name: nfs-pv-provisioning-demo
5 | annotations:
6 | volume.beta.kubernetes.io/storage-class: managed-premium
7 | labels:
8 | demo: nfs-pv-provisioning
9 | spec:
10 | accessModes: [ "ReadWriteOnce" ]
11 | resources:
12 | requests:
13 | storage: 200Gi
14 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/provisioner/nfs-server-cdk-pv.yaml:
--------------------------------------------------------------------------------
1 | # PersistentVolumeClaim for Canonical's Charmed Distribution of Kubernetes.
2 |
3 | apiVersion: v1
4 | kind: PersistentVolumeClaim
5 | metadata:
6 | name: nfs-pv-provisioning-demo
7 | labels:
8 | demo: nfs-pv-provisioning
9 | spec:
10 | accessModes: [ "ReadWriteOnce" ]
11 | resources:
12 | requests:
13 | storage: 200Gi
14 | storageClassName: cdk-cinder
15 |
16 |
--------------------------------------------------------------------------------
/_archived/volumes/nfs/provisioner/nfs-server-gce-pv.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | name: nfs-pv-provisioning-demo
5 | labels:
6 | demo: nfs-pv-provisioning
7 | spec:
8 | accessModes: [ "ReadWriteOnce" ]
9 | resources:
10 | requests:
11 | storage: 200Gi
12 |
--------------------------------------------------------------------------------
/_archived/volumes/portworx/portworx-volume-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: test-portworx-volume-pod
5 | spec:
6 | containers:
7 | - image: registry.k8s.io/test-webserver
8 | name: test-container
9 | volumeMounts:
10 | - mountPath: /test-portworx-volume
11 | name: test-volume
12 | volumes:
13 | - name: test-volume
14 | # This Portworx volume must already exist.
15 | portworxVolume:
16 | volumeID: "vol1"
17 |
--------------------------------------------------------------------------------
/_archived/volumes/portworx/portworx-volume-pv.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolume
3 | metadata:
4 | name: pv0001
5 | spec:
6 | capacity:
7 | storage: 2Gi
8 | accessModes:
9 | - ReadWriteOnce
10 | persistentVolumeReclaimPolicy: Retain
11 | portworxVolume:
12 | volumeID: "pv0001"
13 |
--------------------------------------------------------------------------------
/_archived/volumes/portworx/portworx-volume-pvc.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pvc0001
5 | spec:
6 | accessModes:
7 | - ReadWriteOnce
8 | resources:
9 | requests:
10 | storage: 2Gi
--------------------------------------------------------------------------------
/_archived/volumes/portworx/portworx-volume-pvcpod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: pvpod
5 | spec:
6 | containers:
7 | - name: test-container
8 | image: registry.k8s.io/test-webserver
9 | volumeMounts:
10 | - name: test-volume
11 | mountPath: /test-portworx-volume
12 | volumes:
13 | - name: test-volume
14 | persistentVolumeClaim:
15 | claimName: pvc0001
16 |
--------------------------------------------------------------------------------
/_archived/volumes/portworx/portworx-volume-pvcsc.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pvcsc001
5 | spec:
6 | accessModes:
7 | - ReadWriteOnce
8 | resources:
9 | requests:
10 | storage: 2Gi
11 | storageClassName: portworx-io-priority-high
12 |
--------------------------------------------------------------------------------
/_archived/volumes/portworx/portworx-volume-pvcscpod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: pvpod
5 | spec:
6 | containers:
7 | - name: test-container
8 | image: registry.k8s.io/test-webserver
9 | volumeMounts:
10 | - name: test-volume
11 | mountPath: /test-portworx-volume
12 | volumes:
13 | - name: test-volume
14 | persistentVolumeClaim:
15 | claimName: pvcsc001
16 |
--------------------------------------------------------------------------------
/_archived/volumes/portworx/portworx-volume-sc-high.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: portworx-io-priority-high
5 | provisioner: kubernetes.io/portworx-volume
6 | parameters:
7 | repl: "1"
8 | snap_interval: "70"
9 | io_priority: "high"
10 |
--------------------------------------------------------------------------------
/_archived/volumes/quobyte/quobyte-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: quobyte
5 | spec:
6 | containers:
7 | - name: quobyte
8 | image: kubernetes/pause
9 | volumeMounts:
10 | - mountPath: /mnt
11 | name: quobytevolume
12 | volumes:
13 | - name: quobytevolume
14 | quobyte:
15 | registry: registry:7861
16 | volume: testVolume
17 | readOnly: false
18 | user: root
19 | group: root
20 |
--------------------------------------------------------------------------------
/_archived/volumes/rbd/rbd-with-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: rbd2
5 | spec:
6 | containers:
7 | - image: kubernetes/pause
8 | name: rbd-rw
9 | volumeMounts:
10 | - name: rbdpd
11 | mountPath: /mnt/rbd
12 | volumes:
13 | - name: rbdpd
14 | rbd:
15 | monitors:
16 | - '10.16.154.78:6789'
17 | - '10.16.154.82:6789'
18 | - '10.16.154.83:6789'
19 | pool: kube
20 | image: foo
21 | fsType: ext4
22 | readOnly: true
23 | user: admin
24 | secretRef:
25 | name: ceph-secret
26 |
--------------------------------------------------------------------------------
/_archived/volumes/rbd/rbd.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: rbd
5 | spec:
6 | containers:
7 | - image: kubernetes/pause
8 | name: rbd-rw
9 | volumeMounts:
10 | - name: rbdpd
11 | mountPath: /mnt/rbd
12 | volumes:
13 | - name: rbdpd
14 | rbd:
15 | monitors:
16 | - '10.16.154.78:6789'
17 | - '10.16.154.82:6789'
18 | - '10.16.154.83:6789'
19 | pool: kube
20 | image: foo
21 | fsType: ext4
22 | readOnly: true
23 | user: admin
24 | keyring: /etc/ceph/keyring
25 | imageformat: "2"
26 | imagefeatures: "layering"
27 |
28 |
--------------------------------------------------------------------------------
/_archived/volumes/rbd/secret/ceph-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: ceph-secret
5 | type: "kubernetes.io/rbd"
6 | data:
7 | key: QVFCMTZWMVZvRjVtRXhBQTVrQ1FzN2JCajhWVUxSdzI2Qzg0SEE9PQ==
8 |
--------------------------------------------------------------------------------
/_archived/volumes/scaleio/pod-sc-pvc.yaml:
--------------------------------------------------------------------------------
1 | kind: Pod
2 | apiVersion: v1
3 | metadata:
4 | name: pod-sio-small
5 | spec:
6 | containers:
7 | - name: pod-sio-small-container
8 | image: registry.k8s.io/test-webserver
9 | volumeMounts:
10 | - mountPath: /test
11 | name: test-data
12 | volumes:
13 | - name: test-data
14 | persistentVolumeClaim:
15 | claimName: pvc-sio-small
16 |
--------------------------------------------------------------------------------
/_archived/volumes/scaleio/pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: pod-0
5 | spec:
6 | containers:
7 | - image: registry.k8s.io/test-webserver
8 | name: pod-0
9 | volumeMounts:
10 | - mountPath: /test-pd
11 | name: vol-0
12 | volumes:
13 | - name: vol-0
14 | scaleIO:
15 | gateway: https://localhost:443/api
16 | system: scaleio
17 | protectionDoamin: pd01
18 | storagePool: sp01
19 | volumeName: vol-0
20 | secretRef:
21 | name: sio-secret
22 | fsType: xfs
23 |
--------------------------------------------------------------------------------
/_archived/volumes/scaleio/sc-pvc.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pvc-sio-small
5 | spec:
6 | storageClassName: sio-small
7 | accessModes:
8 | - ReadWriteOnce
9 | resources:
10 | requests:
11 | storage: 10Gi
12 | storageClassName: sio-small
13 |
--------------------------------------------------------------------------------
/_archived/volumes/scaleio/sc.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: sio-small
5 | provisioner: kubernetes.io/scaleio
6 | parameters:
7 | gateway: https://localhost:443/api
8 | system: scaleio
9 | protectionDomain: pd01
10 | storagePool: pd01
11 | secretRef: sio-secret
12 | fsType: xfs
13 |
--------------------------------------------------------------------------------
/_archived/volumes/scaleio/secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: sio-secret
5 | type: kubernetes.io/scaleio
6 | data:
7 | username: YWRtaW4=
8 | password: c0NhbGVpbzEyMw==
9 |
--------------------------------------------------------------------------------
/_archived/volumes/storageos/storageos-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | labels:
5 | name: redis
6 | role: master
7 | name: test-storageos-redis
8 | spec:
9 | containers:
10 | - name: master
11 | image: kubernetes/redis:v1
12 | env:
13 | - name: MASTER
14 | value: "true"
15 | ports:
16 | - containerPort: 6379
17 | resources:
18 | limits:
19 | cpu: "0.1"
20 | volumeMounts:
21 | - mountPath: /redis-master-data
22 | name: redis-data
23 | volumes:
24 | - name: redis-data
25 | storageos:
26 | # This volume must already exist within StorageOS
27 | volumeName: redis-vol01
28 | # Namespace is optional, and specifies the volume scope within
29 | # StorageOS. If no namespace is provided, it will use the namespace
30 | # of the pod. Set to `default` or leave blank if you are not using
31 | # namespaces.
32 | #namespace: test-storageos
33 | # The name of the storageos pool to use. Will use `default` if not
34 | # specified, which should be available on most StorageOS clusters.
35 | pool: default
36 | # The filesystem type to create on the volume, if required.
37 | fsType: ext4
38 |
--------------------------------------------------------------------------------
/_archived/volumes/storageos/storageos-pv.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolume
3 | metadata:
4 | name: pv0001
5 | spec:
6 | capacity:
7 | storage: 5Gi
8 | accessModes:
9 | - ReadWriteOnce
10 | persistentVolumeReclaimPolicy: Delete
11 | storageClassName: fast
12 | storageos:
13 | # This volume must already exist within StorageOS
14 | volumeName: pv0001
15 | # volumeNamespace is optional, and specifies the volume scope within
16 | # StorageOS. Set to `default` or leave blank if you are not using
17 | # namespaces.
18 | #volumeNamespace: default
19 | # The filesystem type to create on the volume, if required.
20 | fsType: ext4
21 | # The secret name for API credentials
22 | secretName: storageos-secret
23 |
--------------------------------------------------------------------------------
/_archived/volumes/storageos/storageos-pvc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | name: pvc0001
5 | spec:
6 | accessModes:
7 | - ReadWriteOnce
8 | resources:
9 | requests:
10 | storage: 5Gi
11 | storageClassName: fast
12 |
--------------------------------------------------------------------------------
/_archived/volumes/storageos/storageos-pvcpod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | labels:
5 | name: redis
6 | role: master
7 | name: test-storageos-redis-pvc
8 | spec:
9 | containers:
10 | - name: master
11 | image: kubernetes/redis:v1
12 | env:
13 | - name: MASTER
14 | value: "true"
15 | ports:
16 | - containerPort: 6379
17 | resources:
18 | limits:
19 | cpu: "0.1"
20 | volumeMounts:
21 | - mountPath: /redis-master-data
22 | name: redis-data
23 | volumes:
24 | - name: redis-data
25 | persistentVolumeClaim:
26 | claimName: pvc0001
27 |
--------------------------------------------------------------------------------
/_archived/volumes/storageos/storageos-sc-pvc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | name: fast0001
5 | spec:
6 | accessModes:
7 | - ReadWriteOnce
8 | storageClassName: fast
9 | resources:
10 | requests:
11 | storage: 5Gi
12 |
--------------------------------------------------------------------------------
/_archived/volumes/storageos/storageos-sc-pvcpod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | labels:
5 | name: redis
6 | role: master
7 | name: test-storageos-redis-sc-pvc
8 | spec:
9 | containers:
10 | - name: master
11 | image: kubernetes/redis:v1
12 | env:
13 | - name: MASTER
14 | value: "true"
15 | ports:
16 | - containerPort: 6379
17 | resources:
18 | limits:
19 | cpu: "0.1"
20 | volumeMounts:
21 | - mountPath: /redis-master-data
22 | name: redis-data
23 | volumes:
24 | - name: redis-data
25 | persistentVolumeClaim:
26 | claimName: fast0001
27 |
--------------------------------------------------------------------------------
/_archived/volumes/storageos/storageos-sc.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: sc-fast
5 | provisioner: kubernetes.io/storageos
6 | parameters:
7 | pool: default
8 | description: Kubernetes volume
9 | fsType: ext4
10 | adminSecretNamespace: default
11 | adminSecretName: storageos-secret
--------------------------------------------------------------------------------
/_archived/volumes/storageos/storageos-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: storageos-secret
5 | type: "kubernetes.io/storageos"
6 | data:
7 | apiAddress: dGNwOi8vMTI3LjAuMC4xOjU3MDU=
8 | apiUsername: c3RvcmFnZW9z
9 | apiPassword: c3RvcmFnZW9z
10 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: deployment
5 | spec:
6 | selector:
7 | matchLabels:
8 | app: redis
9 | replicas: 1
10 | template:
11 | metadata:
12 | labels:
13 | app: redis
14 | spec:
15 | containers:
16 | - name: redis
17 | image: redis
18 | volumeMounts:
19 | - name: vmfs-vmdk-storage
20 | mountPath: /data/
21 | volumes:
22 | - name: vmfs-vmdk-storage
23 | vsphereVolume:
24 | volumePath: "[Datastore] volumes/testdir"
25 | fsType: ext4
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/simple-statefulset.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | apiVersion: v1
3 | kind: Service
4 | metadata:
5 | name: nginx
6 | labels:
7 | app: nginx
8 | spec:
9 | ports:
10 | - port: 80
11 | name: web
12 | clusterIP: None
13 | selector:
14 | app: nginx
15 | ---
16 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
17 | kind: StatefulSet
18 | metadata:
19 | name: web
20 | labels:
21 | app: nginx
22 | spec:
23 | serviceName: "nginx"
24 | selector:
25 | matchLabels:
26 | app: nginx
27 | replicas: 14
28 | template:
29 | metadata:
30 | labels:
31 | app: nginx
32 | spec:
33 | containers:
34 | - name: nginx
35 | image: registry.k8s.io/nginx-slim:0.8
36 | ports:
37 | - containerPort: 80
38 | name: web
39 | volumeMounts:
40 | - name: www
41 | mountPath: /usr/share/nginx/html
42 | volumeClaimTemplates:
43 | - metadata:
44 | name: www
45 | spec:
46 | accessModes: [ "ReadWriteOnce" ]
47 | resources:
48 | requests:
49 | storage: 1Gi
50 | storageClassName: thin-disk
51 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/simple-storageclass.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: thin-disk
5 | provisioner: kubernetes.io/vsphere-volume
6 | parameters:
7 | diskformat: thin
8 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-pod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: test-vmdk
5 | spec:
6 | containers:
7 | - image: registry.k8s.io/test-webserver
8 | name: test-container
9 | volumeMounts:
10 | - mountPath: /test-vmdk
11 | name: test-volume
12 | volumes:
13 | - name: test-volume
14 | # This VMDK volume must already exist.
15 | vsphereVolume:
16 | volumePath: "[DatastoreName] volumes/myDisk"
17 | fsType: ext4
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-pv.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolume
3 | metadata:
4 | name: pv0001
5 | spec:
6 | capacity:
7 | storage: 2Gi
8 | accessModes:
9 | - ReadWriteOnce
10 | persistentVolumeReclaimPolicy: Retain
11 | vsphereVolume:
12 | volumePath: "[DatastoreName] volumes/myDisk"
13 | fsType: ext4
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-pvc.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pvc0001
5 | spec:
6 | accessModes:
7 | - ReadWriteOnce
8 | resources:
9 | requests:
10 | storage: 2Gi
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-pvcpod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: pvpod
5 | spec:
6 | containers:
7 | - name: test-container
8 | image: registry.k8s.io/test-webserver
9 | volumeMounts:
10 | - name: test-volume
11 | mountPath: /test-vmdk
12 | volumes:
13 | - name: test-volume
14 | persistentVolumeClaim:
15 | claimName: pvc0001
16 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-pvcsc.yaml:
--------------------------------------------------------------------------------
1 | kind: PersistentVolumeClaim
2 | apiVersion: v1
3 | metadata:
4 | name: pvcsc001
5 | spec:
6 | accessModes:
7 | - ReadWriteOnce
8 | resources:
9 | requests:
10 | storage: 2Gi
11 | storageClassName: fast
12 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-pvcscpod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: pvpod
5 | spec:
6 | containers:
7 | - name: test-container
8 | image: registry.k8s.io/test-webserver
9 | volumeMounts:
10 | - name: test-volume
11 | mountPath: /test-vmdk
12 | volumes:
13 | - name: test-volume
14 | persistentVolumeClaim:
15 | claimName: pvcsc001
16 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-pvcscvsanpod.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: pvpod
5 | spec:
6 | containers:
7 | - name: test-container
8 | image: registry.k8s.io/test-webserver
9 | volumeMounts:
10 | - name: test-volume
11 | mountPath: /test
12 | volumes:
13 | - name: test-volume
14 | persistentVolumeClaim:
15 | claimName: pvcsc-vsan
16 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-sc-fast.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: fast
5 | provisioner: kubernetes.io/vsphere-volume
6 | parameters:
7 | diskformat: zeroedthick
8 | fstype: ext3
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-sc-vsancapabilities-with-datastore.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: fast
5 | provisioner: kubernetes.io/vsphere-volume
6 | parameters:
7 | diskformat: zeroedthick
8 | datastore: vsanDatastore
9 | hostFailuresToTolerate: "2"
10 | cachereservation: "20"
11 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-sc-vsancapabilities.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: fast
5 | provisioner: kubernetes.io/vsphere-volume
6 | parameters:
7 | diskformat: zeroedthick
8 | hostFailuresToTolerate: "2"
9 | cachereservation: "20"
10 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-sc-with-datastore.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: fast
5 | provisioner: kubernetes.io/vsphere-volume
6 | parameters:
7 | diskformat: zeroedthick
8 | datastore: vsanDatastore
9 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-spbm-policy-with-datastore.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: fast
5 | provisioner: kubernetes.io/vsphere-volume
6 | parameters:
7 | diskformat: zeroedthick
8 | storagePolicyName: gold
9 | datastore: VSANDatastore
10 |
--------------------------------------------------------------------------------
/_archived/volumes/vsphere/vsphere-volume-spbm-policy.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: fast
5 | provisioner: kubernetes.io/vsphere-volume
6 | parameters:
7 | diskformat: zeroedthick
8 | storagePolicyName: gold
9 |
--------------------------------------------------------------------------------
/cassandra/OWNERS:
--------------------------------------------------------------------------------
1 | # See the OWNERS docs at https://go.k8s.io/owners
2 |
3 | reviewers:
4 | - aledbf
5 | approvers:
6 | - aledbf
7 |
--------------------------------------------------------------------------------
/cassandra/README.md:
--------------------------------------------------------------------------------
1 | # Example: Cassandra with StatefulSets on Kubernetes
2 |
3 |
4 | This directory contains the source code and Kubernetes manifests for Cassandra
5 | deployment with StatefulSets tutorial.
6 |
7 | Follow this tutorial at https://kubernetes.io/docs/tutorials/stateful-application/cassandra/.
8 |
--------------------------------------------------------------------------------
/cassandra/cassandra-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | app: cassandra
6 | name: cassandra
7 | spec:
8 | clusterIP: None
9 | ports:
10 | - port: 9042
11 | selector:
12 | app: cassandra
13 |
--------------------------------------------------------------------------------
/cassandra/image/files/kubernetes-cassandra.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubernetes/examples/209452cc17f0632f06fa0a1f79060884b8277968/cassandra/image/files/kubernetes-cassandra.jar
--------------------------------------------------------------------------------
/cassandra/image/files/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %-5level %date{HH:mm:ss,SSS} %msg%n
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cassandra/image/files/ready-probe.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2016 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | if [[ $(nodetool status | grep $POD_IP) == *"UN"* ]]; then
18 | if [[ $DEBUG ]]; then
19 | echo "UN";
20 | fi
21 | exit 0;
22 | else
23 | if [[ $DEBUG ]]; then
24 | echo "Not Up";
25 | fi
26 | exit 1;
27 | fi
28 |
--------------------------------------------------------------------------------
/cassandra/java/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 |
--------------------------------------------------------------------------------
/cassandra/java/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 | %-5level %date{HH:mm:ss,SSS} %msg%n
22 |
23 |
24 | DEBUG
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/code-of-conduct.md:
--------------------------------------------------------------------------------
1 | # Kubernetes Community Code of Conduct
2 |
3 | Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md)
4 |
--------------------------------------------------------------------------------
/guestbook-go/.gitignore:
--------------------------------------------------------------------------------
1 | guestbook_bin
2 |
--------------------------------------------------------------------------------
/guestbook-go/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM golang:1.10.0
16 | RUN go get github.com/codegangsta/negroni \
17 | github.com/gorilla/mux \
18 | github.com/xyproto/simpleredis/v2
19 | WORKDIR /app
20 | ADD ./main.go .
21 | RUN CGO_ENABLED=0 GOOS=linux go build -o main .
22 |
23 | FROM scratch
24 | WORKDIR /app
25 | COPY --from=0 /app/main .
26 | COPY ./public/index.html public/index.html
27 | COPY ./public/script.js public/script.js
28 | COPY ./public/style.css public/style.css
29 | CMD ["/app/main"]
30 | EXPOSE 3000
31 |
--------------------------------------------------------------------------------
/guestbook-go/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | # Build the guestbook-go example
16 |
17 | # Usage:
18 | # [VERSION=v3] [REGISTRY="staging-k8s.gcr.io"] make build
19 | VERSION?=v3
20 | REGISTRY?=staging-k8s.gcr.io
21 |
22 | release: clean build push clean
23 |
24 | # builds a docker image that builds the app and packages it into a minimal docker image
25 | build:
26 | docker buildx build --load -t ${REGISTRY}/guestbook:${VERSION} .
27 |
28 | # push the image to an registry
29 | push:
30 | docker buildx build --push -t ${REGISTRY}/guestbook:${VERSION} .
31 |
32 | # remove previous images and containers
33 | clean:
34 | docker rm -f ${REGISTRY}/guestbook:${VERSION} 2> /dev/null || true
35 |
36 | .PHONY: release clean build push
37 |
--------------------------------------------------------------------------------
/guestbook-go/guestbook-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: guestbook
5 | labels:
6 | app: guestbook
7 | spec:
8 | replicas: 3
9 | selector:
10 | app: guestbook
11 | template:
12 | metadata:
13 | labels:
14 | app: guestbook
15 | spec:
16 | containers:
17 | - name: guestbook
18 | image: registry.k8s.io/guestbook:v3
19 | ports:
20 | - name: http-server
21 | containerPort: 3000
22 |
--------------------------------------------------------------------------------
/guestbook-go/guestbook-page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kubernetes/examples/209452cc17f0632f06fa0a1f79060884b8277968/guestbook-go/guestbook-page.png
--------------------------------------------------------------------------------
/guestbook-go/guestbook-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: guestbook
5 | labels:
6 | app: guestbook
7 | spec:
8 | ports:
9 | - port: 3000
10 | targetPort: http-server
11 | selector:
12 | app: guestbook
13 | type: LoadBalancer
14 |
--------------------------------------------------------------------------------
/guestbook-go/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Guestbook
9 |
10 |
11 |
14 |
15 |
16 |
Waiting for database connection...
17 |
18 |
19 |
25 |
26 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/guestbook-go/public/style.css:
--------------------------------------------------------------------------------
1 | body, input {
2 | color: #123;
3 | font-family: "Gill Sans", sans-serif;
4 | }
5 |
6 | div {
7 | overflow: hidden;
8 | padding: 1em 0;
9 | position: relative;
10 | text-align: center;
11 | }
12 |
13 | h1, h2, p, input, a {
14 | font-weight: 300;
15 | margin: 0;
16 | }
17 |
18 | h1 {
19 | color: #BDB76B;
20 | font-size: 3.5em;
21 | }
22 |
23 | h2 {
24 | color: #999;
25 | }
26 |
27 | form {
28 | margin: 0 auto;
29 | max-width: 50em;
30 | text-align: center;
31 | }
32 |
33 | input {
34 | border: 0;
35 | border-radius: 1000px;
36 | box-shadow: inset 0 0 0 2px #BDB76B;
37 | display: inline;
38 | font-size: 1.5em;
39 | margin-bottom: 1em;
40 | outline: none;
41 | padding: .5em 5%;
42 | width: 55%;
43 | }
44 |
45 | form a {
46 | background: #BDB76B;
47 | border: 0;
48 | border-radius: 1000px;
49 | color: #FFF;
50 | font-size: 1.25em;
51 | font-weight: 400;
52 | padding: .75em 2em;
53 | text-decoration: none;
54 | text-transform: uppercase;
55 | white-space: normal;
56 | }
57 |
58 | p {
59 | font-size: 1.5em;
60 | line-height: 1.5;
61 | }
62 |
--------------------------------------------------------------------------------
/guestbook-go/redis-master-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: redis-master
5 | labels:
6 | app: redis
7 | role: master
8 | spec:
9 | replicas: 1
10 | selector:
11 | app: redis
12 | role: master
13 | template:
14 | metadata:
15 | labels:
16 | app: redis
17 | role: master
18 | spec:
19 | containers:
20 | - name: redis-master
21 | image: redis
22 | ports:
23 | - name: redis-server
24 | containerPort: 6379
25 |
--------------------------------------------------------------------------------
/guestbook-go/redis-master-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: redis-master
5 | labels:
6 | app: redis
7 | role: master
8 | spec:
9 | ports:
10 | - port: 6379
11 | targetPort: redis-server
12 | selector:
13 | app: redis
14 | role: master
15 |
--------------------------------------------------------------------------------
/guestbook-go/redis-replica-controller.yaml:
--------------------------------------------------------------------------------
1 | kind: ReplicationController
2 | apiVersion: v1
3 | metadata:
4 | name: redis-replica
5 | labels:
6 | app: redis
7 | role: replica
8 | spec:
9 | replicas: 2
10 | selector:
11 | app: redis
12 | role: replica
13 | template:
14 | metadata:
15 | labels:
16 | app: redis
17 | role: replica
18 | spec:
19 | containers:
20 | - name: redis-replica
21 | image: registry.k8s.io/redis-slave:v2
22 | ports:
23 | - name: redis-server
24 | containerPort: 6379
25 |
--------------------------------------------------------------------------------
/guestbook-go/redis-replica-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: redis-replica
5 | labels:
6 | app: redis
7 | role: replica
8 | spec:
9 | ports:
10 | - port: 6379
11 | targetPort: redis-server
12 | selector:
13 | app: redis
14 | role: replica
15 |
--------------------------------------------------------------------------------
/guestbook/MAINTENANCE.md:
--------------------------------------------------------------------------------
1 | ## Building the Docker images
2 |
3 | ```console
4 | $ docker build -t gcr.io/google-samples/gb-frontend:v5 php-redis
5 |
6 | $ docker build -t gcr.io/google-samples/gb-redisslave:v2 redis-slave
7 | ```
8 |
9 | Building Multi-architecture docker images
10 |
11 | ```console
12 | $ make -C php-redis
13 |
14 | $ make -C redis-slave
15 | ```
16 |
17 | Push:
18 |
19 | ```console
20 | $ make -C php-redis all-push
21 |
22 | $ make -C redis-slave all-push
23 | ```
24 |
--------------------------------------------------------------------------------
/guestbook/README.md:
--------------------------------------------------------------------------------
1 | # Example: Guestbook application on Kubernetes
2 |
3 | This directory contains the source code and Kubernetes manifests for PHP
4 | Guestbook application.
5 |
6 | Follow the tutorial at https://kubernetes.io/docs/tutorials/stateless-application/guestbook/.
7 |
--------------------------------------------------------------------------------
/guestbook/all-in-one/redis-replica.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: redis-replica
5 | labels:
6 | app: redis
7 | role: replica
8 | tier: backend
9 | spec:
10 | ports:
11 | - port: 6379
12 | selector:
13 | app: redis
14 | role: replica
15 | tier: backend
16 | ---
17 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
18 | kind: Deployment
19 | metadata:
20 | name: redis-replica
21 | spec:
22 | selector:
23 | matchLabels:
24 | app: redis
25 | role: replica
26 | tier: backend
27 | replicas: 2
28 | template:
29 | metadata:
30 | labels:
31 | app: redis
32 | role: replica
33 | tier: backend
34 | spec:
35 | containers:
36 | - name: replica
37 | image: gcr.io/google_samples/gb-redisslave:v1
38 | resources:
39 | requests:
40 | cpu: 100m
41 | memory: 100Mi
42 | env:
43 | - name: GET_HOSTS_FROM
44 | value: dns
45 | # If your cluster config does not include a dns service, then to
46 | # instead access an environment variable to find the master
47 | # service's host, comment out the 'value: dns' line above, and
48 | # uncomment the line below:
49 | # value: env
50 | ports:
51 | - containerPort: 6379
52 |
--------------------------------------------------------------------------------
/guestbook/frontend-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: frontend
5 | spec:
6 | selector:
7 | matchLabels:
8 | app: guestbook
9 | tier: frontend
10 | replicas: 3
11 | template:
12 | metadata:
13 | labels:
14 | app: guestbook
15 | tier: frontend
16 | spec:
17 | containers:
18 | - name: php-redis
19 | image: gcr.io/google-samples/gb-frontend:v5
20 | resources:
21 | requests:
22 | cpu: 100m
23 | memory: 100Mi
24 | env:
25 | - name: GET_HOSTS_FROM
26 | value: dns
27 | # If your cluster config does not include a dns service, then to
28 | # instead access environment variables to find service host
29 | # info, comment out the 'value: dns' line above, and uncomment the
30 | # line below:
31 | # value: env
32 | ports:
33 | - containerPort: 80
34 |
--------------------------------------------------------------------------------
/guestbook/frontend-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: frontend
5 | labels:
6 | app: guestbook
7 | tier: frontend
8 | spec:
9 | # comment or delete the following line if you want to use a LoadBalancer
10 | type: NodePort
11 | # if your cluster supports it, uncomment the following to automatically create
12 | # an external load-balanced IP for the frontend service.
13 | # type: LoadBalancer
14 | ports:
15 | - port: 80
16 | selector:
17 | app: guestbook
18 | tier: frontend
19 |
--------------------------------------------------------------------------------
/guestbook/legacy/frontend-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: frontend
5 | spec:
6 | replicas: 3
7 | template:
8 | metadata:
9 | labels:
10 | app: guestbook
11 | tier: frontend
12 | spec:
13 | containers:
14 | - name: php-redis
15 | image: gcr.io/google_samples/gb-frontend:v4
16 | resources:
17 | requests:
18 | cpu: 100m
19 | memory: 100Mi
20 | env:
21 | - name: GET_HOSTS_FROM
22 | value: dns
23 | # If your cluster config does not include a dns service, then to
24 | # instead access environment variables to find service host
25 | # info, comment out the 'value: dns' line above, and uncomment the
26 | # line below:
27 | # value: env
28 | ports:
29 | - containerPort: 80
30 |
--------------------------------------------------------------------------------
/guestbook/legacy/redis-master-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: redis-master
5 | labels:
6 | app: redis
7 | role: master
8 | tier: backend
9 | spec:
10 | replicas: 1
11 | template:
12 | metadata:
13 | labels:
14 | app: redis
15 | role: master
16 | tier: backend
17 | spec:
18 | containers:
19 | - name: master
20 | image: registry.k8s.io/redis:e2e # or just image: redis
21 | resources:
22 | requests:
23 | cpu: 100m
24 | memory: 100Mi
25 | ports:
26 | - containerPort: 6379
27 |
--------------------------------------------------------------------------------
/guestbook/legacy/redis-replica-controller.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ReplicationController
3 | metadata:
4 | name: redis-replica
5 | labels:
6 | app: redis
7 | role: replica
8 | tier: backend
9 | spec:
10 | replicas: 2
11 | template:
12 | metadata:
13 | labels:
14 | app: redis
15 | role: replica
16 | tier: backend
17 | spec:
18 | containers:
19 | - name: replica
20 | image: gcr.io/google_samples/gb-redisslave:v1
21 | resources:
22 | requests:
23 | cpu: 100m
24 | memory: 100Mi
25 | env:
26 | - name: GET_HOSTS_FROM
27 | value: dns
28 | # If your cluster config does not include a dns service, then to
29 | # instead access an environment variable to find the master
30 | # service's host, comment out the 'value: dns' line above, and
31 | # uncomment the line below:
32 | # value: env
33 | ports:
34 | - containerPort: 6379
35 |
--------------------------------------------------------------------------------
/guestbook/php-redis/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM php:5-apache
16 |
17 | RUN pear channel-discover pear.nrk.io
18 | RUN pear install nrk/Predis
19 |
20 | # If the container's stdio is connected to systemd-journald,
21 | # /proc/self/fd/{1,2} are Unix sockets and apache will not be able to open()
22 | # them. Use "cat" to write directly to the already opened fds without opening
23 | # them again.
24 | RUN sed -i 's#ErrorLog /proc/self/fd/2#ErrorLog "|$/bin/cat 1>\&2"#' /etc/apache2/apache2.conf
25 | RUN sed -i 's#CustomLog /proc/self/fd/1 combined#CustomLog "|/bin/cat" combined#' /etc/apache2/apache2.conf
26 |
27 | ADD guestbook.php /var/www/html/guestbook.php
28 | ADD controllers.js /var/www/html/controllers.js
29 | ADD index.html /var/www/html/index.html
30 |
--------------------------------------------------------------------------------
/guestbook/php-redis/controllers.js:
--------------------------------------------------------------------------------
1 | var redisApp = angular.module('redis', ['ui.bootstrap']);
2 |
3 | /**
4 | * Constructor
5 | */
6 | function RedisController() {}
7 |
8 | RedisController.prototype.onRedis = function() {
9 | this.scope_.messages.push(this.scope_.msg);
10 | this.scope_.msg = "";
11 | var value = this.scope_.messages.join();
12 | this.http_.get("guestbook.php?cmd=set&key=messages&value=" + value)
13 | .success(angular.bind(this, function(data) {
14 | this.scope_.redisResponse = "Updated.";
15 | }));
16 | };
17 |
18 | redisApp.controller('RedisCtrl', function ($scope, $http, $location) {
19 | $scope.controller = new RedisController();
20 | $scope.controller.scope_ = $scope;
21 | $scope.controller.location_ = $location;
22 | $scope.controller.http_ = $http;
23 |
24 | $scope.controller.http_.get("guestbook.php?cmd=get&key=messages")
25 | .success(function(data) {
26 | console.log(data);
27 | $scope.messages = data.data.split(",");
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/guestbook/php-redis/guestbook.php:
--------------------------------------------------------------------------------
1 | 'tcp',
19 | 'host' => $host,
20 | 'port' => 6379,
21 | ]);
22 |
23 | $client->set($_GET['key'], $_GET['value']);
24 | print('{"message": "Updated"}');
25 | } else {
26 | $host = 'redis-replica';
27 | if (getenv('GET_HOSTS_FROM') == 'env') {
28 | $host = getenv('REDIS_SLAVE_SERVICE_HOST');
29 | }
30 | $client = new Predis\Client([
31 | 'scheme' => 'tcp',
32 | 'host' => $host,
33 | 'port' => 6379,
34 | ]);
35 |
36 | $value = $client->get($_GET['key']);
37 | print('{"data": "' . $value . '"}');
38 | }
39 | } else {
40 | phpinfo();
41 | } ?>
42 |
--------------------------------------------------------------------------------
/guestbook/php-redis/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Guestbook
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Guestbook
12 |
18 |
19 |
20 | {{msg}}
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/guestbook/redis-master-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: redis-master
5 | spec:
6 | selector:
7 | matchLabels:
8 | app: redis
9 | role: master
10 | tier: backend
11 | replicas: 1
12 | template:
13 | metadata:
14 | labels:
15 | app: redis
16 | role: master
17 | tier: backend
18 | spec:
19 | containers:
20 | - name: master
21 | image: registry.k8s.io/redis:e2e # or just image: redis
22 | resources:
23 | requests:
24 | cpu: 100m
25 | memory: 100Mi
26 | ports:
27 | - containerPort: 6379
28 |
--------------------------------------------------------------------------------
/guestbook/redis-master-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: redis-master
5 | labels:
6 | app: redis
7 | role: master
8 | tier: backend
9 | spec:
10 | ports:
11 | - port: 6379
12 | targetPort: 6379
13 | selector:
14 | app: redis
15 | role: master
16 | tier: backend
17 |
--------------------------------------------------------------------------------
/guestbook/redis-replica-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: redis-replica
5 | spec:
6 | selector:
7 | matchLabels:
8 | app: redis
9 | role: replica
10 | tier: backend
11 | replicas: 2
12 | template:
13 | metadata:
14 | labels:
15 | app: redis
16 | role: replica
17 | tier: backend
18 | spec:
19 | containers:
20 | - name: slave
21 | image: gcr.io/google_samples/gb-redisslave:v1
22 | resources:
23 | requests:
24 | cpu: 100m
25 | memory: 100Mi
26 | env:
27 | - name: GET_HOSTS_FROM
28 | value: dns
29 | # If your cluster config does not include a dns service, then to
30 | # instead access an environment variable to find the master
31 | # service's host, comment out the 'value: dns' line above, and
32 | # uncomment the line below:
33 | # value: env
34 | ports:
35 | - containerPort: 6379
36 |
--------------------------------------------------------------------------------
/guestbook/redis-replica-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: redis-replica
5 | labels:
6 | app: redis
7 | role: replica
8 | tier: backend
9 | spec:
10 | ports:
11 | - port: 6379
12 | selector:
13 | app: redis
14 | role: replica
15 | tier: backend
16 |
--------------------------------------------------------------------------------
/guestbook/redis-slave/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 The Kubernetes Authors.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM redis:3.2.9
16 |
17 | COPY run.sh /
18 |
19 | CMD /run.sh
20 |
--------------------------------------------------------------------------------
/guestbook/redis-slave/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2014 The Kubernetes Authors.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | if [[ ${GET_HOSTS_FROM:-dns} == "env" ]]; then
18 | redis-server --slaveof ${REDIS_MASTER_SERVICE_HOST} 6379
19 | else
20 | redis-server --slaveof redis-master 6379
21 | fi
22 |
--------------------------------------------------------------------------------
/mysql-cinder-pd/mysql-service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | name: mysql
6 | name: mysql
7 | spec:
8 | ports:
9 | # the port that this service should serve on
10 | - port: 3306
11 | # label keys and values that must match in order to receive traffic for this service
12 | selector:
13 | name: mysql
--------------------------------------------------------------------------------
/mysql-cinder-pd/mysql.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: mysql
5 | labels:
6 | name: mysql
7 | spec:
8 | containers:
9 | - resources:
10 | limits :
11 | cpu: 0.5
12 | image: mysql
13 | name: mysql
14 | args:
15 | - "--ignore-db-dir"
16 | - "lost+found"
17 | env:
18 | - name: MYSQL_ROOT_PASSWORD
19 | # change this
20 | value: yourpassword
21 | ports:
22 | - containerPort: 3306
23 | name: mysql
24 | volumeMounts:
25 | # name must match the volume name below
26 | - name: mysql-persistent-storage
27 | # mount path within the container
28 | mountPath: /var/lib/mysql
29 | volumes:
30 | - name: mysql-persistent-storage
31 | cinder:
32 | volumeID: bd82f7e2-wece-4c01-a505-4acf60b07f4a
33 | fsType: ext4
34 |
--------------------------------------------------------------------------------