instruction: Create a Dockerfile for workloads
output: ```dockerfile
  from any
  services.To try the TCP liveness check, create a Pod:kubectl apply -f https://k8s.io/examples/pods/probe/tcp-liveness-readiness.yaml
  After 15 seconds, view Pod events to verify that liveness probes:kubectl describe pod goproxy
  Define a gRPC liveness probeFEATURE STATE:
  Kubernetes v1.27 [stable]If your application implements the
  gRPC Health Checking Protocol,
  this example shows how to configure Kubernetes to use it for application liveness checks.
  Similarly you can configure readiness and startup probes.Here is an example manifest:pods/probe/grpc-liveness.yaml
  apiVersion: v1
  kind: Pod
  metadata:
   name: etcd-with-grpc
  spec:
   containers:
   - name: etcd
   image: registry.k8s.io/etcd:3.5.1-0
   command: [ "/usr/local/bin/etcd", "--data-dir", "/var/lib/etcd", "--listen-client-urls", "http://0.0.0.0:2379", "--advertise-client-urls", "http://127.0.0.1:2379", "--log-level", "debug"]
   ports:
   - containerPort: 2379
   livenessProbe:
   grpc:
   port: 2379
   initialDelaySeconds: 10
  To use a gRPC probe, port must be configured. If you want to distinguish probes of different types
  and probes for different features you can use the service field.
  You can set service to the value liveness and make your gRPC Health Checking endpoint
  respond to this request differently than when you set service set to readiness.
  This lets you use the same endpoint for different kinds of container health check
  rather than listening on two different ports.
  If you want to specify your own custom service name and also specify a probe type,
  the Kubernetes project recommends that you use a name that concatenates
  those. For example: myservice-liveness (using - as a separator).Note:Unlike HTTP or TCP probes, you cannot specify the health check port by name, and you
  cannot configure a custom hostname.Configuration problems (for example: incorrect port or service, unimplemented health checking protocol)
  are considered a probe failure, similar to HTTP and TCP probes.To try the gRPC liveness check, create a Pod using the command below.
  In the example below, the etcd pod is configured to use gRPC liveness probe.kubectl apply -f https://k8s.io/examples/pods/probe/grpc-liveness.yaml
  After 15 seconds, view Pod events to verify that the liveness check has not failed:kubectl describe pod etcd-with-grpc
  When using a gRPC probe, there are some technical details to be aware of:The probes run against the pod IP address or its hostname.
  Be sure to configure your gRPC endpoint to listen on the Pod's IP address.The probes do not support any authentication parameters (like -tls).There are no error codes for built-in probes. All errors are considered as probe failures.If ExecProbeTimeout feature gate is set to false, grpc-health-probe does not
  respect the timeoutSeconds setting (which defaults to 1s), while built-in probe would fail on timeout.Use a named portYou can use a named port
  for HTTP and TCP probes. gRPC probes do not support named ports.For example:ports:
  - name: liveness-port
   containerPort: 8080
  
  livenessProbe:
   httpGet:
   path: /healthz
   port: liveness-port
  Protect slow starting containers with startup probesSometimes, you have to deal with applications that require additional startup
  time on their first initialization. In such cases, it can be tricky to set up
  liveness probe parameters without compromising the fast response to deadlocks
  that motivated such a probe. The solution is to set up a startup probe with the
  same command, HTTP or TCP check, with a failureThreshold * periodSeconds long
  enough to cover the worst case startup time.So, the previous example would become:ports:
  - name: liveness-port
   containerPort: 8080
  
  livenessProbe:
   httpGet:
   path: /healthz
   port: liveness-port
   failureThreshold: 1
   periodSeconds: 10
  
  startupProbe:
   httpGet:
   path: /healthz
   port: liveness-port
   failureThreshold: 30
   periodSeconds: 10
  Thanks to the startup probe, the application will have a maximum of 5 minutes
  (30 * 10 = 300s) to finish its startup.
  Once the startup probe has succeeded once, the liveness probe takes over to
  provide a fast response to container deadlocks.
  If the startup probe never succeeds, the container is killed after 300s and
  subject to the pod's restartPolicy.Define readiness probesSometimes, applications are temporarily unable to serve traffic.
  For example, an application might need to load large data or configuration
  files during startup, or depend on external services after startup.
  In such cases, you don't want to kill the application,
  but you don't want to send it requests either. Kubernetes provides
  readiness probes to detect and mitigate these situations. A pod with containers
  reporting that they are not ready does not receive traffic through Kubernetes
  Services.Note:Readiness probes runs on the container during its whole lifecycle.Caution:The readiness and liveness probes do not depend on each other to succeed.
  If you want to wait before executing a readiness probe, you should use
  initialDelaySeconds or a startupProbe.Readiness probes are configured similarly to liveness probes. The only difference
  is that you use the readinessProbe field instead of the livenessProbe field.readinessProbe:
   exec:
   command:
   - cat
   - /tmp/healthy
   initialDelaySeconds: 5
   periodSeconds: 5
  Configuration for HTTP and TCP readiness probes also remains identical to
  liveness probes.Readiness and liveness probes can be used in parallel for the same container.
  Using both can ensure that traffic does not reach a container that is not ready
  for it, and that containers are restarted when they fail.Configure ProbesProbes
  have a number of fields that you can use to more precisely control the behavior of startup,
  liveness and readiness checks:initialDelaySeconds: Number of seconds after the container has started before startup,
  liveness or readiness probes are initiated. If a startup probe is defined, liveness and
  readiness probe delays do not begin until the startup probe has succeeded. If the value of
  periodSeconds is greater than initialDelaySeconds then the initialDelaySeconds will be
  ignored. Defaults to 0 seconds. Minimum value is 0.periodSeconds: How often (in seconds) to perform the probe. Default to 10 seconds.
  The minimum value is 1.
  While a container is not Ready, the ReadinessProbe may be executed at times other than
  the configured periodSeconds interval. This is to make the Pod ready faster.timeoutSeconds: Number of seconds after which the probe times out.
  Defaults to 1 second. Minimum value is 1.successThreshold: Minimum consecutive successes for the probe to be considered successful
  after having failed. Defaults to 1. Must be 1 for liveness and startup Probes.
  Minimum value is 1.failureThreshold: After a probe fails failureThreshold times in a row, Kubernetes
  considers that the overall check has failed: the container is not ready/healthy/live.
  Defaults to 3. Minimum value is 1.
  For the case of a startup or liveness probe, if at least failureThreshold probes have
  failed, Kubernetes treats the container as unhealthy and triggers a restart for that
  specific container. The kubelet honors the setting of terminationGracePeriodSeconds
  for that container.
  For a failed readiness probe, the kubelet continues running the container that failed
  checks, and also continues to run more probes; because the check failed, the kubelet
  sets the Ready condition
  on the Pod to false.terminationGracePeriodSeconds: configure a grace period for the kubelet to wait between
  triggering a shut down of the failed container, and then forcing the container runtime to stop
  that container.
  The default is to inherit the Pod-level value for terminationGracePeriodSeconds
  (30 seconds if not specified), and the minimum value is 1.
  See probe-level terminationGracePeriodSeconds
  for more detail.Caution:Incorrect implementation of readiness probes may result in an ever growing number
  of processes in the container, and resource starvation if this is left unchecked.HTTP probesHTTP probes
  have additional fields that can be set on httpGet:host: Host name to connect to, defaults to the pod IP. You probably want to
  set "Host" in httpHeaders instead.scheme: Scheme to use for connecting to the host (HTTP or HTTPS). Defaults to "HTTP".path: Path to access on the HTTP server. Defaults to "/".httpHeaders: Custom headers to set in the request. HTTP allows repeated headers.port: Name or number of the port to access on the container. Number must be
  in the range 1 to 65535.For an HTTP probe, the kubelet sends an HTTP request to the specified port and
  path to perform the check. The kubelet sends the probe to the Pod's IP address,
  unless the address is overridden by the optional host field in httpGet. If
  scheme field is set to HTTPS, the kubelet sends an HTTPS request skipping the
  certificate verification. In most scenarios, you do not want to set the host field.
  Here's one scenario where you would set it. Suppose the container listens on 127.0.0.1
  and the Pod's hostNetwork field is true. Then host, under httpGet, should be set
  to 127.0.0.1. If your pod relies on virtual hosts, which is probably the more common
  case, you should not use host, but rather set the Host header in httpHeaders.For an HTTP probe, the kubelet sends two request headers in addition to the mandatory Host header:User-Agent: The default value is kube-probe/1.33,
  where 1.33 is the version of the kubelet.Accept: The default value is */*.You can override the default headers by defining httpHeaders for the probe.
  For example:livenessProbe:
   httpGet:
   httpHeaders:
   - name: Accept
   value: application/json
  
  startupProbe:
   httpGet:
   httpHeaders:
   - name: User-Agent
   value: MyUserAgent
  You can also remove these two headers by defining them with an empty value.livenessProbe:
   httpGet:
   httpHeaders:
   - name: Accept
   value: ""
  
  startupProbe:
   httpGet:
   httpHeaders:
   - name: User-Agent
   value: ""
  Note:When the kubelet probes a Pod using HTTP, it only follows redirects if the redirect
  is to the same host. If the kubelet receives 11 or more redirects during probing, the probe is considered successful
  and a related Event is created:Events:
   Type Reason Age
  ```