-
-
Save satococoa/0821c7588b2b1badbe3d4821809f9038 to your computer and use it in GitHub Desktop.
kubernetes サンプル
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: app-ingress | |
spec: | |
tls: | |
- secretName: ssl-certs | |
backend: | |
serviceName: app | |
servicePort: 80 | |
---- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: app | |
labels: | |
name: app | |
spec: | |
type: NodePort | |
ports: | |
- port: 80 | |
targetPort: 3000 | |
selector: | |
app: app | |
---- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: app | |
spec: | |
replicas: | |
template: | |
metadata: | |
labels: | |
app: app | |
spec: | |
containers: | |
- image: asia.gcr.io/<PROJECT>/<IMAGE_NAME>:<TAG> | |
name: app | |
env: | |
- name: RAILS_ENV | |
value: production | |
- name: RAILS_LOG_TO_STDOUT | |
value: 'true' | |
- name: SECRET_KEY_BASE | |
valueFrom: | |
secretKeyRef: | |
name: app-secrets | |
key: secret_key_base | |
ports: | |
- containerPort: 3000 | |
livenessProbe: | |
httpGet: | |
path: /_health | |
port: 3000 | |
initialDelaySeconds: 30 | |
timeoutSeconds: 1 | |
readinessProbe: | |
httpGet: | |
path: /_health | |
port: 3000 | |
initialDelaySeconds: 30 | |
timeoutSeconds: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment