A Comparative Study of AI-Generated and Human-Written Kubernetes Manifests

Document Type : Research Article

Authors

1 Department of Electrical and Computer Engineering, Isfahan University of Technology, Isfahan 84156-83111, Iran

2 Department of Electrical and Computer Engineering, Isfahan University of Technology, Isfahan 84156-83111, Iran.

Abstract

Kubernetes is susceptible to security and quality issues when misconfigured; meanwhile, the use of generative models such as ChatGPT to produce manifests is rising. This study compares the configuration quality of human-authored manifests (1985 open-source files) with a published 2023 corpus of AI-generated manifests (98 ChatGPT-generated files aligned with a prior MSR study). Using an aligned KubeLinter-based framework, we analyze six configuration smells and report density (occurrences per 1000 raw lines) and proportion (percentage of files affected). We also add a balanced-size robustness check that subsamples 98 human-written manifests 1000 times. The results show that missing CPU and memory specifications remain more prevalent in the AI corpus under this balanced comparison. In contrast, omissions in secure execution, such as missing runAsNonRoot and readOnlyRootFilesystem, are important in both corpora. An issue-level smell-by-kind analysis of the human corpus shows that 85.16% of target-smell occurrences concentrate in Deployment and StatefulSet resources. The findings provide a focused empirical baseline and support the use of human review, static analysis, and policy enforcement before integration or deployment.

Keywords

Main Subjects


[1] Miles, S.. Kubernetes: A Step-By-Step Guide For Beginners To Build, Manage, Develop, and Intelligently Deploy Applications (2020 Edition). Independently Published. 2020.
[2] Zhang, Y. and Meredith, R. and Reeves, W. and Coriolano, J. and Babar, M. A. and Rahman, A.. Does Generative {AI} Generate Smells Related to Container Orchestration? An Exploratory Study with {Kubernetes} Manifests. Proceedings of the 21st International Conference on Mining Software Repositories (MSR). 192--196, 2024. [DOI ]
[3] Kubernetes. Case Study: Capital One. https://kubernetes.io/case-studies/capital-one/. Accessed: 2023-06-10. 2023.
[4] Markets N Research. Latest Global {Kubernetes} Market Size \& Share: {USD} 7.8 Billion by 2030. https://www.globenewswire.com/news-release/2023/03/06/2621358/0/en/ Latest-Global-Kubernetes-Market-Size-Share-Worth -USD-7-8-Billion-by-2030-at-an-23-40-CAGR-Markets-N-Research-Share-Trends-Cap -Adoption-Forecast-Segmentation-Growth-Value.html. Accessed: 2023-06-12. 2023.
[5] Rahman, A. and Shamim, S. I. and Bose, D. B. and Pandita, R.. Security Misconfigurations in Open Source {Kubernetes} Manifests: An Empirical Study. ACM Transactions on Software Engineering and Methodology. 32(4): 1--36, 2023. [DOI ]
[6] Red Hat. State of {Kubernetes} Security Report. https://www.redhat.com/en/resources/state-kubernetes-security-report. Accessed: 2021-06-01. 2021.
[7] Diarra, B. and Guillouard, K. and Ouzzif, M. and Merle, P. and Stefani, J.-B.. In-depth Analysis of {Kubernetes} Manifest Verification Tools for Robust {CNF} Deployment. 27th Conference on Innovation in Clouds, Internet and Networks (ICIN). 17--24, IEEE. 2024. [DOI ]
[8] Bose, D. B. and Rahman, A. and Shamim, S. I.. 'Under-reported' Security Defects in {Kubernetes} Manifests. 2021 IEEE/ACM 2nd International Workshop on Engineering and Cybersecurity of Critical Systems (EnCyCriS). 9--12, IEEE. 2021. [DOI ]
[9] Canonical. Kubernetes and Cloud Native Operations Report 2021. https://juju.is/cloud-native-kubernetes-usage-report-2021. Accessed: 2025-03-23. 2021.
[10] Nag, D.. Overcoming the {Kubernetes} Skills Gap with {ChatGPT} Assistance. https://thenewstack.io/overcoming-the-kubernetes-skills-gap-with-chatgpt-assistance/. Accessed: 2023-11-18. 2023.
[11] OpsCruise. Exploiting {ChatGPT} for Troubleshooting {Kubernetes} Problems. https://www.opscruise.com/newsroom-post/exploiting-chatgpt-for-troubleshooting-kubernetes-problems. Accessed: 2025-04-04. 2023.
[12] Ravindranathan, R.. ChatGPT for your Kubernetes Cluster. https://medium.com/techbeatly/chatgpt-for-your-kubernetes-cluster-k8sgpt-649f2cad1bd5. Accessed: 2023-11-19. 2023.
[13] Gupta, M. and Akiri, C. and Aryal, K. and Parker, E. and Praharaj, L.. From {ChatGPT} to {ThreatGPT}: Impact of Generative {AI} in Cybersecurity and Privacy. IEEE Access. 11: 80218--80245, 2023. [DOI ]
[14] KubeLinter. Introduction --- {KubeLinter}. https://docs.kubelinter.io/. Accessed: 2024-01-19. 2024.
[15] Rahman, A. S. and Shamim, S. I. and Bose, D. B. and Pandita, R.. Verifiability Package for Paper. https://figshare.com/s/bced7c8353853a983cd7. Accessed: 2022-08-20. 2022. [DOI ]
[16] Kubernetes. Production-grade Container Orchestration (Docs). https://kubernetes.io/docs/. Accessed: 2025-03-21. 2021.
[17] Shamim, M. S. I. and Bhuiyan, F. A. and Rahman, A.. XI Commandments of Kubernetes Security: A Systematization of Knowledge Related to {Kubernetes} Security Practices. 2020 IEEE Secure Development (SecDev). 58--64, IEEE. 2020. [DOI ]
[18] Burns, B. and Beda, J. and Hightower, K. and Evenson, L.. Kubernetes: Up and Running (3rd ed.). O'Reilly Media. 2022.
[19] Ibryam, B. and Hu{\ss}, R.. Kubernetes Patterns (2nd ed.). O'Reilly Media. 2022.