Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
780e51ea
Commit
780e51ea
authored
Jun 10, 2015
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update examples/mysql-wordpress-pd to v1
parent
bdeb4f31
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
12 deletions
+16
-12
README.md
examples/mysql-wordpress-pd/README.md
+11
-7
mysql-service.yaml
examples/mysql-wordpress-pd/mysql-service.yaml
+1
-1
mysql.yaml
examples/mysql-wordpress-pd/mysql.yaml
+1
-1
wordpress-service.yaml
examples/mysql-wordpress-pd/wordpress-service.yaml
+2
-2
wordpress.yaml
examples/mysql-wordpress-pd/wordpress.yaml
+1
-1
No files found.
examples/mysql-wordpress-pd/README.md
View file @
780e51ea
...
...
@@ -66,7 +66,7 @@ First, **edit [`mysql.yaml`](mysql.yaml)**, the mysql pod definition, to use a d
`mysql.yaml`
looks like this:
```
yaml
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
mysql
...
...
@@ -135,7 +135,7 @@ So if we label our Kubernetes mysql service `mysql`, the wordpress pod will be a
The
[
`mysql-service.yaml`
](
mysql-service.yaml
)
file looks like this:
```
yaml
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Service
metadata
:
labels
:
...
...
@@ -170,7 +170,7 @@ Once the mysql service is up, start the wordpress pod, specified in
Note that this config file also defines a volume, this one using the
`wordpress-disk`
persistent disk that you created.
```
yaml
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
wordpress
...
...
@@ -220,23 +220,23 @@ Once the wordpress pod is running, start its service, specified by [`wordpress-s
The service config file looks like this:
```
yaml
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Service
metadata
:
labels
:
name
:
wpfrontend
name
:
wpfrontend
spec
:
createExternalLoadBalancer
:
true
ports
:
# the port that this service should serve on
-
port
:
80
# label keys and values that must match in order to receive traffic for this service
selector
:
name
:
wordpress
type
:
LoadBalancer
```
Note the
`
createExternal
LoadBalancer`
setting. This will set up the wordpress service behind an external IP.
Note the
`
type:
LoadBalancer`
setting. This will set up the wordpress service behind an external IP.
Note also that we've set the service port to 80. We'll return to that shortly.
Start the service:
...
...
@@ -251,8 +251,12 @@ and see it in the list of services:
$
kubectl get services
```
Then, find the external IP for your WordPress service by listing the forwarding rules for your project:
Then, find the external IP for your WordPress service by running:
```
$ kubectl get services/wpfrontend --template="{{range .status.loadBalancer.ingress}} {{.ip}} {{end}}"
```
or by listing the forwarding rules for your project:
```
shell
$
gcloud compute forwarding-rules list
```
...
...
examples/mysql-wordpress-pd/mysql-service.yaml
View file @
780e51ea
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Service
metadata
:
labels
:
...
...
examples/mysql-wordpress-pd/mysql.yaml
View file @
780e51ea
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
mysql
...
...
examples/mysql-wordpress-pd/wordpress-service.yaml
View file @
780e51ea
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Service
metadata
:
labels
:
name
:
wpfrontend
name
:
wpfrontend
spec
:
createExternalLoadBalancer
:
true
ports
:
# the port that this service should serve on
-
port
:
80
# label keys and values that must match in order to receive traffic for this service
selector
:
name
:
wordpress
type
:
LoadBalancer
examples/mysql-wordpress-pd/wordpress.yaml
View file @
780e51ea
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
wordpress
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment