Last active
September 19, 2019 03:58
-
-
Save mixj93/7472053045189c0ba26c8ad6bfcb8fef to your computer and use it in GitHub Desktop.
k8s yamls
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
apiVersion: v1 | |
data: | |
theKey: theValue | |
kind: ConfigMap | |
metadata: | |
name: configmap | |
namespace: lxl |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: amp | |
name: amp | |
namespace: lxl | |
spec: | |
progressDeadlineSeconds: 600 | |
replicas: 1 | |
revisionHistoryLimit: 10 | |
selector: | |
matchLabels: | |
app: amp | |
strategy: | |
rollingUpdate: | |
maxSurge: 25% | |
maxUnavailable: 25% | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app: amp | |
name: amp | |
spec: | |
containers: | |
- image: reg-qce.kirkcloud.com/lxl-hub/hello-k8s:0.0.1 | |
imagePullPolicy: IfNotPresent | |
name: container-0 | |
resources: | |
limits: | |
cpu: "1" | |
memory: 1Gi | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
schedulerName: default-scheduler | |
terminationGracePeriodSeconds: 30 |
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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ing | |
namespace: lxl | |
spec: | |
rules: | |
- host: test.test.com | |
http: | |
paths: | |
- backend: | |
serviceName: svc-yaml | |
servicePort: 80 | |
path: / |
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
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: volume | |
namespace: lxl | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi | |
storageClassName: ceph |
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
{ | |
"spec": { | |
"serviceName": "kubia", | |
"updateStrategy": { | |
"type": "RollingUpdate", | |
"rollingUpdate": {} | |
}, | |
"volumeClaimTemplates": [ | |
{ | |
"metadata": { | |
"name": "data" | |
}, | |
"spec": { | |
"accessModes": [ | |
"ReadWriteOnce" | |
], | |
"storageClassName": "ceph", | |
"resources": { | |
"requests": { | |
"storage": "1Gi" | |
} | |
} | |
} | |
} | |
], | |
"replicas": 2, | |
"selector": { | |
"matchLabels": { | |
"kirk.qiniu.com/release": "ta0vvqf2dlq1g0g8dlc0", | |
"kirk.qiniu.com/workload": "kubia" | |
} | |
}, | |
"template": { | |
"metadata": { | |
"name": "kubia", | |
"labels": { | |
"kirk.qiniu.com/release": "ta0vvqf2dlq1g0g8dlc0", | |
"kirk.qiniu.com/workload": "kubia" | |
} | |
}, | |
"spec": { | |
"tolerations": [], | |
"containers": [ | |
{ | |
"name": "cc", | |
"image": "reg-poc.cloudappl.com/lixueli/kubia-pet:latest", | |
"resources": { | |
"limits": { | |
"cpu": "1000m", | |
"memory": "1Gi" | |
} | |
}, | |
"command": [], | |
"volumeMounts": [ | |
{ | |
"mountPath": "/data", | |
"name": "pvc-data", | |
"readOnly": false | |
}, | |
{ | |
"mountPath": "/var/data", | |
"name": "data", | |
"readOnly": false | |
} | |
], | |
"env": [] | |
} | |
], | |
"volumes": [ | |
{ | |
"name": "pvc-data", | |
"persistentVolumeClaim": { | |
"claimName": "data" | |
} | |
} | |
], | |
"imagePullSecrets": [ | |
{ | |
"name": "default-registry-secret" | |
} | |
] | |
} | |
} | |
}, | |
"metadata": { | |
"name": "kubia", | |
"labels": { | |
"kirk.qiniu.com/release": "ta0vvqf2dlq1g0g8dlc0", | |
"kirk.qiniu.com/workload": "kubia" | |
}, | |
"annotations": { | |
"kirk.qiniu.com/create-type": "ui" | |
} | |
} | |
} |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: svc | |
namespace: lxl | |
spec: | |
ports: | |
- name: port-0 | |
port: 1 | |
protocol: TCP | |
targetPort: 1 | |
sessionAffinity: None | |
type: ClusterIP | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ing | |
namespace: lxl | |
spec: | |
rules: | |
- host: test.test.com | |
http: | |
paths: | |
- backend: | |
serviceName: svc-yaml | |
servicePort: 80 | |
path: / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment