-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* k8s guestbook application example for use in tutorial (#626) * copy over k8s guestbook application example for use in tutorial Signed-off-by: Will Tsai <[email protected]> * Apply suggestions from code review Co-authored-by: Jonathan Smith <[email protected]> --------- Signed-off-by: Will Tsai <[email protected]> Co-authored-by: Jonathan Smith <[email protected]> * Upmerge 10-24 (#695) * Update get.radapp.dev references (#625) * Update get.radapp.dev refernces * Update vscode extension install * Update eShop Readme with new url links (#647) * Fix edge version download (#685) * Add Kuberenetes tutorial content (#620) * Add Kuberenetes tutorial content * Update demo/Chart/values.yaml Co-authored-by: Aaron Crawfis <[email protected]> * Update demo/Chart/values.yaml Co-authored-by: Aaron Crawfis <[email protected]> * k8s guestbook application example for use in tutorial (#626) * copy over k8s guestbook application example for use in tutorial Signed-off-by: Will Tsai <[email protected]> * Apply suggestions from code review Co-authored-by: Jonathan Smith <[email protected]> --------- Signed-off-by: Will Tsai <[email protected]> Co-authored-by: Jonathan Smith <[email protected]> * Rebase to v0.26 * move chat templatesto samples --------- Signed-off-by: Will Tsai <[email protected]> Co-authored-by: Aaron Crawfis <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jonathan Smith <[email protected]> Co-authored-by: Reshma Abdul Rahim <[email protected]> Co-authored-by: Reshma Abdul Rahim <[email protected]> * Revert changes to test.yaml --------- Signed-off-by: Aaron Crawfis <[email protected]> Signed-off-by: Will Tsai <[email protected]> Co-authored-by: Aaron Crawfis <[email protected]> Co-authored-by: James Montemagno <[email protected]> Co-authored-by: Ryan Nowak <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jonathan Smith <[email protected]> * Added a condition to allow Docker to fully setup during post-create before initializing the K3d cluster (#694) Co-authored-by: Reshma Abdul Rahim <[email protected]> --------- Signed-off-by: Will Tsai <[email protected]> Signed-off-by: Aaron Crawfis <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jonathan Smith <[email protected]> Co-authored-by: Aaron Crawfis <[email protected]> Co-authored-by: James Montemagno <[email protected]> Co-authored-by: Ryan Nowak <[email protected]> Co-authored-by: jasonviviano <[email protected]>
- Loading branch information
1 parent
5b4f462
commit fc01c69
Showing
9 changed files
with
157 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Kubernetes Guestbook application example | ||
|
||
This is an example containerized Guestbook application originally authored by the Kubernetes community for use in their own tutorial. The application's Kubernetes deployment manifests copied over from the Kubernetes source [repo](https://github.com/kubernetes/examples/tree/master/guestbook) are contained in the `deploy` directory. | ||
|
||
The Guestbook application consists of a web front end along with primary and secondary Redis containers for storage, all deployed with Kubernetes. For more information about the application and accessing its source code, see the [Kubernetes tutorial](https://kubernetes.io/docs/tutorials/stateless-application/guestbook/) and their [examples repo](https://github.com/kubernetes/examples/tree/master/guestbook). |
33 changes: 33 additions & 0 deletions
33
samples/kubernetes/guestbook/deploy/frontend-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: frontend | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: guestbook | ||
tier: frontend | ||
replicas: 3 | ||
template: | ||
metadata: | ||
labels: | ||
app: guestbook | ||
tier: frontend | ||
spec: | ||
containers: | ||
- name: php-redis | ||
image: gcr.io/google-samples/gb-frontend:v4 | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
env: | ||
- name: GET_HOSTS_FROM | ||
value: dns | ||
# If your cluster config does not include a dns service, then to | ||
# instead access environment variables to find service host | ||
# info, comment out the 'value: dns' line above, and uncomment the | ||
# line below: | ||
# value: env | ||
ports: | ||
- containerPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: frontend | ||
labels: | ||
app: guestbook | ||
tier: frontend | ||
spec: | ||
# comment or delete the following line if you want to use a LoadBalancer | ||
type: NodePort | ||
# if your cluster supports it, uncomment the following to automatically create | ||
# an external load-balanced IP for the frontend service. | ||
# type: LoadBalancer | ||
ports: | ||
- port: 80 | ||
selector: | ||
app: guestbook | ||
tier: frontend |
27 changes: 27 additions & 0 deletions
27
samples/kubernetes/guestbook/deploy/redis-master-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: redis-master | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: redis | ||
role: master | ||
tier: backend | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: redis | ||
role: master | ||
tier: backend | ||
spec: | ||
containers: | ||
- name: master | ||
image: registry.k8s.io/redis:e2e # or just image: redis | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
ports: | ||
- containerPort: 6379 |
16 changes: 16 additions & 0 deletions
16
samples/kubernetes/guestbook/deploy/redis-master-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: redis-master | ||
labels: | ||
app: redis | ||
role: master | ||
tier: backend | ||
spec: | ||
ports: | ||
- port: 6379 | ||
targetPort: 6379 | ||
selector: | ||
app: redis | ||
role: master | ||
tier: backend |
35 changes: 35 additions & 0 deletions
35
samples/kubernetes/guestbook/deploy/redis-replica-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: redis-replica | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: redis | ||
role: replica | ||
tier: backend | ||
replicas: 2 | ||
template: | ||
metadata: | ||
labels: | ||
app: redis | ||
role: replica | ||
tier: backend | ||
spec: | ||
containers: | ||
- name: slave | ||
image: gcr.io/google_samples/gb-redisslave:v1 | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
env: | ||
- name: GET_HOSTS_FROM | ||
value: dns | ||
# If your cluster config does not include a dns service, then to | ||
# instead access an environment variable to find the master | ||
# service's host, comment out the 'value: dns' line above, and | ||
# uncomment the line below: | ||
# value: env | ||
ports: | ||
- containerPort: 6379 |
15 changes: 15 additions & 0 deletions
15
samples/kubernetes/guestbook/deploy/redis-replica-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: redis-replica | ||
labels: | ||
app: redis | ||
role: replica | ||
tier: backend | ||
spec: | ||
ports: | ||
- port: 6379 | ||
selector: | ||
app: redis | ||
role: replica | ||
tier: backend |