Last active
June 20, 2018 07:15
-
-
Save viktortnk/8e2b8812998ade6da498842a647eeb7f to your computer and use it in GitHub Desktop.
k8s deployment sample
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
# deployment-sample.yml | |
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: my-service-name # name of your deployment | |
namespace: default | |
spec: | |
replicas: 4 # number of instances to spin | |
template: | |
labels: # parameters to match instances in your deployment | |
app: my-service-name | |
env: dev | |
spec: | |
containers: | |
- env: # environment variables | |
- name: JAVA_OPTS | |
value: -Xmx1024m -Dfile.encoding=UTF-8 | |
image: quay.io/organization/my-container:v123 # images | |
args: | |
- -cache.redis.dest=10.154.0.20:6379 # passing arguments | |
name: my-service-name | |
ports: | |
- containerPort: 50054 # defining port your service running on (if applicable) | |
name: service | |
imagePullSecrets: | |
- name: my-key # key name to access container image from private registry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment