Skip to content

Instantly share code, notes, and snippets.

@viktortnk
Last active June 20, 2018 07:15
Show Gist options
  • Save viktortnk/8e2b8812998ade6da498842a647eeb7f to your computer and use it in GitHub Desktop.
Save viktortnk/8e2b8812998ade6da498842a647eeb7f to your computer and use it in GitHub Desktop.
k8s deployment sample
# 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