mirror of https://github.com/k3s-io/k3s
Merge pull request #4828 from sub-mod/v1beta3_json_3
Update examples to support v1beta3 api - liveness/mysql-wordpresspull/6/head
commit
987cabd711
|
@ -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: 1
|
||||||
|
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