cd /news/cloud-computing/deployment-yaml-manifest · home topics cloud-computing article
[ARTICLE · art-10758] src=gist.github.com ↗ pub= topic=cloud-computing verified=true sentiment=· neutral

Deployment YAML manifest

The article provides a YAML manifest for a Kubernetes Deployment resource named `go-helloworld` in the default namespace. It specifies three replicas of a pod running the `pixelpotato/go-helloworld:v2.0.0` image, with rolling update strategy, liveness and readiness probes on port 6112, and resource limits of 128Mi memory and 500m CPU. The manifest also includes a corresponding Service resource definition to expose the application.

read4 min views37 publishedMay 21, 2021

deploymentexample.yaml

  This file contains hidden or 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

Show hidden characters

#

apiVersion : apps/v1

#

kind : Deployment

#

metadata :

annotations :

labels :

app : go-helloworld

name : go-helloworld

namespace : default

#

spec :

#

#

replicas : 3

#

#

selector :

matchLabels :

app : go-helloworld

#

#

strategy :

rollingUpdate :

maxSurge : 25%

maxUnavailable : 25%

type : RollingUpdate

#

template :

#

#

metadata :

labels :

app : go-helloworld

#

spec :

containers :

#

#

#

  - 

image :

pixelpotato/go-helloworld:v2.0.0 imagePullPolicy : IfNotPresent

name : go-helloworld

#

#

ports :

    - 

containerPort : 6112

protocol : TCP

#

#

#

livenessProbe :

httpGet :

path : /

port : 6112

#

#

#

readinessProbe :

httpGet :

path : /

port : 6112

#

resources :

#

#

#

requests :

memory : " 64Mi "

cpu : " 250m "

#

#

#

limits :

memory : " 128Mi "

cpu : " 500m "

serviceexample.yaml

  This file contains hidden or 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

Show hidden characters

Set the API endpoint used to create the Service resource. #

apiVersion: v1

Define the type of the resource. #

kind: Service

Set the parameters that make the object identifiable, such as its name, namespace, and labels. #

metadata:

labels:

    app: go-helloworld

  name: go-helloworld

namespace: default

Define the desired configuration for the Service resource. #

spec:

Define the ports that the service should serve on. #

For example, the service is exposed on port 8111, and #

directs the traffic to the pods on port 6112, using TCP. #

ports:

  - port: 8111

    protocol: TCP

    targetPort: 6112

Identify the pods managed by this Service using the following selectors. #

In this case, all pods with the label go-helloworld. #

selector:

app: go-helloworld

Define the Service type, here set to ClusterIP. #

type: ClusterIP

── more in #cloud-computing 4 stories · sorted by recency
── more on @go-helloworld 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/deployment-yaml-mani…] indexed:0 read:4min 2021-05-21 ·