Update examples to support v1beta3 api - liveness/mysql-wordpress
This commit is contained in:
parent
6f5cf10445
commit
a2ee541e6d
|
@ -14,7 +14,9 @@ spec:
|
|||
name: hazelcast
|
||||
spec:
|
||||
containers:
|
||||
- cpu: 1000
|
||||
- resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
image: pires/hazelcast-k8s
|
||||
name: hazelcast
|
||||
ports:
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
apiVersion: v1beta3
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
labels:
|
||||
test: liveness
|
||||
name: liveness-exec
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
test: liveness
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
test: liveness
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- "/bin/sh"
|
||||
- "-c"
|
||||
- "echo ok > /tmp/health; sleep 10; echo fail > /tmp/health; sleep 600"
|
||||
image: busybox
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- "cat"
|
||||
- "/tmp/health"
|
||||
initialDelaySeconds: 15
|
||||
name: liveness
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
apiVersion: v1beta3
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
labels:
|
||||
test: liveness
|
||||
name: liveness-http
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
test: liveness
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
test: liveness
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- "/server"
|
||||
image: kubernetes/liveness
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8080
|
||||
initialDelaySeconds: 15
|
||||
name: liveness
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
apiVersion: v1beta3
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
name: mysql
|
||||
name: mysql
|
||||
spec:
|
||||
containerPort: 3306
|
||||
port: 3306
|
||||
selector:
|
||||
name: mysql
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
apiVersion: v1beta3
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
labels:
|
||||
name: mysql
|
||||
name: mysql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
name: mysql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: mysql
|
||||
spec:
|
||||
containers:
|
||||
- resources:
|
||||
limits :
|
||||
cpu: 1000m
|
||||
image: mysql
|
||||
name: mysql
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
# change this
|
||||
value: yourpassword
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
name: mysql
|
||||
volumeMounts:
|
||||
# name must match the volume name below
|
||||
- name: mysql-persistent-storage
|
||||
# mount path within the container
|
||||
mountPath: /var/lib/mysql
|
||||
volumes:
|
||||
- name: mysql-persistent-storage
|
||||
source:
|
||||
# emptyDir: {}
|
||||
persistentDisk:
|
||||
# This GCE PD must already exist.
|
||||
pdName: mysql-disk
|
||||
fsType: ext4
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
apiVersion: v1beta3
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
name: wpfrontend
|
||||
name: wpfrontend
|
||||
spec:
|
||||
containerPort: 80
|
||||
port: 80
|
||||
selector:
|
||||
name: wpfrontend
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
apiVersion: v1beta3
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
labels:
|
||||
name: wordpress
|
||||
name: wordpress
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
name: wordpress
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: wordpress
|
||||
spec:
|
||||
containers:
|
||||
image: wordpress
|
||||
name: wordpress
|
||||
env:
|
||||
- name: WORDPRESS_DB_PASSWORD
|
||||
# change this - must match mysql.yaml password
|
||||
value: yourpassword
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: wordpress
|
||||
volumeMounts:
|
||||
# name must match the volume name below
|
||||
- name: wordpress-persistent-storage
|
||||
# mount path within the container
|
||||
mountPath: /var/www/html
|
||||
volumes:
|
||||
- name: wordpress-persistent-storage
|
||||
source:
|
||||
# emptyDir: {}
|
||||
persistentDisk:
|
||||
# This GCE PD must already exist.
|
||||
pdName: wordpress-disk
|
||||
fsType: ext4
|
||||
|
Loading…
Reference in New Issue