Pancreatic ductal adenocarcinoma (PDAC) has the highest mortality rate among all solid tumors. Tumorigenesis is promoted by the oncogene KRAS, and KRAS mutations are prevalent in patients with PDAC. Therefore, a comprehensive understanding of the interactions between KRAS mutations and PDAC may expediate the development of therapeutic strategies for reversing the progression of malignant tumors. Our study aims at establishing and validating a prediction model of KRAS mutations in patients with PDAC based on survival analysis and mRNA expression. A total of 184 and 412 patients with PDAC from The Cancer Genome Atlas (TCGA) database and the International Cancer Genome Consortium (ICGC), respectively, were included in the study. After tumor mutation profile and copy number variation (CNV) analyses, we established and validated a prediction model of KRAS mutations, based on survival analysis and mRNA expression, that contained seven genes: CSTF2, FAF2, KIF20B, AKR1A1, APOM, KRT6C, and CD70. We confirmed that the model has a good predictive ability for the prognosis of overall survival (OS) in patients with KRAS-mutated PDAC. Then, we analyzed differential biological pathways, especially the ferroptosis pathway, through principal component analysis, pathway enrichment analysis, Gene Ontology (GO) enrichment analysis, and gene set enrichment analysis (GSEA), with which patients were classified into low- or high-risk groups. Pathway enrichment results revealed enrichment in the cytokine-cytokine receptor interaction, metabolism of xenobiotics by cytochrome P450, and viral protein interaction with cytokine and cytokine receptor pathways. Most of the enriched pathways are metabolic pathways predominantly enriched by downregulated genes, suggesting numerous downregulated metabolic pathways in the high-risk group. Subsequent tumor immune infiltration analysis indicated that neutrophil infiltration, resting CD4 memory T cells, and resting natural killer (NK) cells correlated with the risk score. After verifying that the seven gene expression levels in different KRAS-mutated pancreatic cancer cell lines were similar to that in the model, we screened potential drugs related to the risk score. This study established, analyzed, and validated a model for predicting the prognosis of PDAC based on risk stratification according to KRAS mutations, and identified differential pathways and highly effective drugs.