Skip to content

Instantly share code, notes, and snippets.

@russmiles
Created July 18, 2018 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russmiles/593c956db617503418de0e2170d4f9d6 to your computer and use it in GitHub Desktop.
Save russmiles/593c956db617503418de0e2170d4f9d6 to your computer and use it in GitHub Desktop.
{
"apiVersion" : "apps/v1beta1",
"kind" : "Deployment",
"metadata" : {
"name" : "my-service"
},
"spec" : {
"replicas" : 3,
"selector" : {
"matchLabels" : {
"service" : "my-service"
}
},
"template" : {
"metadata" : {
"name" : "my-app",
"labels" : {
"name" : "my-app",
"service" : "my-service",
"biz-app-id" : "retail"
}
},
"spec" : {
"containers" : [ {
"name" : "my-app",
"ports" : [ {
"name" : "http",
"containerPort" : 8080,
"protocol" : "TCP"
} ],
"imagePullPolicy" : "Always",
"image" : "docker.io/chaosiq/sampleservice:0.1.0",
"resources" : {
"limits" : {
"cpu" : 0.1,
"memory" : "64Mi"
},
"requests" : {
"cpu" : 0.1,
"memory" : "64Mi"
}
}
} ]
}
},
"strategy" : {
"type" : "RollingUpdate",
"rollingUpdate" : {
"maxUnavailable" : 1,
"maxSurge" : 1
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment