instruction: Create a Dockerfile for workloads
output: ```dockerfile
  from apiserver, mypod-on-apiserver.yaml. There will typically be some
  lines on the "apiserver" version that are not on the original version. This is
  expected. However, if there are lines on the original that are not on the apiserver
  version, then this may indicate a problem with your pod spec.Debugging Replication ControllersReplication controllers are fairly straightforward. They can either create Pods or they can't.
  If they can't create pods, then please refer to the
  instructions above to debug your pods.You can also use kubectl describe rc ${CONTROLLER_NAME} to introspect events
  related to the replication controller.Debugging ServicesServices provide load balancing across a set of pods. There are several common problems that can make Services
  not work properly. The following instructions should help debug Service problems.First, verify that there are endpoints for the service. For every Service object,
  the apiserver makes one or more EndpointSlice resources available.You can view these resources with:kubectl get endpointslices -l kubernetes.io/service-name=${SERVICE_NAME}
  Make sure that the endpoints in the EndpointSlices match up with the number of pods that you expect to be members of your service.
  For example, if your Service is for an nginx container with 3 replicas, you would expect to see three different
  IP addresses in the Service's endpoint slices.My service is missing endpointsIf you are missing endpoints, try listing pods using the labels that Service uses.
  Imagine that you have a Service where the labels are:...
  spec:
   - selector:
   name: nginx
   type: frontend
  You can use:kubectl get pods --selector=name=nginx,type=frontend
  to list pods that match this selector. Verify that the list matches the Pods that you expect to provide your Service.
  Verify that the pod's containerPort matches up with the Service's targetPortNetwork traffic is not forwardedPlease see debugging service for more information.What's nextIf none of the above solves your problem, follow the instructions in
  Debugging Service document
  to make sure that your Service is running, has Endpoints, and your Pods are
  actually serving; you have DNS working, iptables rules installed, and kube-proxy
  does not seem to be misbehaving.You may also visit troubleshooting document for more information.FeedbackWas this page helpful?Yes
  NoThanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on
  Stack Overflow.
  Open an issue in the GitHub Repository if you want to
  report a problem
  or
  suggest an improvement.Last modified April 09, 2025 at 5:08 AM PST: Update docs for deprecation of Endpoints API (#49831) (649bda2cbd)  Create child page
   Create an issue
   Print entire sectionDiagnosing the problemDebugging PodsDebugging Replication ControllersDebugging ServicesWhat's next© 2025 The Kubernetes Authors | Documentation Distributed under CC BY 4.0© 2025 The Linux Foundation ®. ```