anchor.diff:          fun(Deployment) ->
               lager:info("Deleting Kubernetes deployment: ~p", [Deployment]),
               delete_deployment(Deployment),
  +            lager:info("Deleting Kubernetes replicasets."),
  +            delete_replicasets(Deployment),
               lager:info("Deleting Kubernetes pods."),
               delete_pods(Deployment)
           end,
  
positive.code:     case delete_request(PodUrl, DecodeFun) of
          {ok, Response} ->
              _ = lager:info("Response: ~p", [Response]),
              ok;
          Error ->
              _ = lager:info("Invalid Kubernetes response: ~p", [Error]),
  
negative.code:     APIServer ++ "/apis/extensions/v1beta1/namespaces/default/deployments/" ++ Deployment.
  
  %% @private
  delete_replicaset(#{<<"metadata">> := Metadata}) ->
      DecodeFun = fun(Body) -> jsx:decode(Body, [return_maps]) end,
      #{<<"selfLink">> := SelfUrl} = Metadata,
  
      APIServer = os:getenv("APISERVER"),
      PodUrl = APIServer ++ binary_to_list(SelfUrl),
  
      case delete_request(PodUrl, DecodeFun) of
          {ok, Response} ->
              _ = lager:info("Response: ~p", [Response]),
              ok;
          Error ->
              _ = lager:info("Invalid Kubernetes response: ~p", [Error]),
              {error, Error}
      end.
  
  %% @private
  delete_pod(#{<<"metadata">> := Metadata}) ->
      DecodeFun = fun(Body) -> jsx:decode(Body, [return_maps]) end,
      #{<<"selfLink">> := SelfUrl} = Metadata,
  