Clustering is the process of dividing a set of input data into a number of subgroups. The members of each subgroup are similar to each other but different from members of other subgroups. The genetic algorithm has enjoyed many applications in clustering data. One of these applications is the clustering of images. The problem with the earlier methods used in clustering images was in selecting initial clusters. In this article it has been tried to develop a set of populations (i.e., cluster centers) using the clonal selection of artificial immune system, and to obtain the final clustering of clusters and the main image among a large number of clusters through the use the K-means and the K- nearest neighbor algorithms. Moreover, chaotic model has also been used to create diversity both in the original population and in the populations produced through the repetition of generations. The algorithms in the paper have been executed on satellite images; and the implementation results showed that the algorithm works well.