Load balancing is critical for container-based cloud computing environments for several reasons. A lack of appropriate load balancing techniques could result in a decrease in performance and possible service interruptions as some nodes get overloaded, while others are left underutilized. Cloud service providers can reduce latency and boost system performance by strategically placing containers using clustering algorithms. These techniques aid in efficiently using resources and load balancing by clustering related containers together according to their shared attributes. Clustering strategies are effective in allocating and controlling resources to meet the demands of a changing workload. Algorithms for clustering combine related workloads or containers into clusters, improving performance isolation and maximizing resource usage. One popular methodology for data clustering is the K-Medoid Clustering Algorithm. It is especially helpful when working with categorical data or when the dataset contains outliers. K-medoids is an unsupervised clustering approach where the core of the cluster is made up of data points known as “medoids.” A medoid is a location in the cluster whose total distance to every object in the cluster—also known as its dissimilarity—is as small as possible. Any appropriate distance function may be used, such as the Manhattan distance, the Euclidean distance, or another one. Thus, by choosing K medoids from our data sample, the K-medoids method splits the data into K clusters. This work presents the K-Medoid clustering technique for containers, which can enhance load balancing, decrease resource execution times, and increase resource utilization rates all at the same time. The results of the experiment show that the proposed method outperforms MACO and FCFS in terms of throughput by about 70% when number of cloudlets increased. The relative improvement of execution time of the proposed K-medoid algorithm w.r.t FCFS is about 50%.