
awx-on-k3s版本管理Operator与AWX版本映射及平滑升级攻略【免费下载链接】awx-on-k3sAn example implementation of AWX on single node K3s using AWX Operator, with easy-to-use simplified configuration with ownership of data and passwords.项目地址: https://gitcode.com/gh_mirrors/aw/awx-on-k3sawx-on-k3s是基于K3s和AWX Operator实现的Ansible自动化平台部署方案通过简化配置实现数据与密码的自主管理。本文将详细介绍AWX Operator与AWX版本映射关系及平滑升级的完整流程帮助用户轻松应对版本更新需求。 版本映射核心指南AWX采用Operator模式进行生命周期管理每个Operator版本会绑定特定的AWX版本。升级Operator时AWX会自动升级至对应版本。以下是最新的版本映射关系表AWX OperatorAWX2.19.124.6.12.19.024.6.02.18.024.5.02.17.024.4.02.16.124.3.12.16.024.3.02.15.024.2.02.14.024.1.02.13.124.0.02.13.024.0.0完整版本映射表可参考tips/version-mapping.md该文件维护了从0.6.0到最新版本的所有映射关系。 如何验证版本对应关系对于0.23.0及以上版本的Operator可通过以下命令获取内置AWX版本# 使用Docker验证 docker run -it --rm --entrypoint /usr/bin/bash quay.io/ansible/awx-operator:${OPERATOR_VERSION} -c env | grep DEFAULT_AWX_VERSION # 使用Kubernetes验证 kubectl run awx-operator --restartNever -it --rm --command /usr/bin/bash --imagequay.io/ansible/awx-operator:${OPERATOR_VERSION} -- -c env | grep DEFAULT_AWX_VERSION 平滑升级操作指南✅ 升级前准备工作备份关键数据升级前务必创建AWX备份可参考backup/README.md执行备份操作检查资源需求确保K3s节点有足够的CPU和内存资源升级过程中会临时运行新旧两个实例确认当前版本执行kubectl -n awx get deployments查看当前Operator版本 不同版本范围的升级方法方法1从0.14.0及以上版本升级推荐适用于从0.14.0及以上版本升级到更高版本操作步骤如下# 克隆项目仓库 git clone https://gitcode.com/gh_mirrors/aw/awx-on-k3s cd awx-on-k3s # 切换到目标版本 git checkout 2.3.0 # 替换为目标版本号 # 部署升级 kubectl apply -k operator⚠️ 从2.12.2或更早版本升级到2.13.1及以上时需额外创建PostgreSQL 15的存储卷sudo mkdir -p /data/postgres-15/data sudo chown 26:0 /data/postgres-15/data sudo chmod 700 /data/postgres-15/data # 创建PV配置文件并应用详细配置见tips/upgrade-operator.md方法2从0.13.0升级到0.14.0及以上0.14.0版本引入了命名空间作用域变更需先清理旧版本Operator# 删除旧版本Operator组件 kubectl -n default delete deployment awx-operator kubectl -n default delete serviceaccount awx-operator kubectl -n default delete clusterrolebinding awx-operator kubectl -n default delete clusterrole awx-operator # 部署新版本 git clone https://gitcode.com/gh_mirrors/aw/awx-on-k3s cd awx-on-k3s git checkout 0.14.0 # 替换为目标版本号 export NAMESPACEawx make deploy 升级进度监控升级过程中可通过以下命令监控进度# 查看Operator日志 kubectl -n awx logs -f deployments/awx-operator-controller-manager -c awx-manager当日志中出现以下内容时表示升级成功完成PLAY RECAP ********************************************************************* localhost : ok56 changed0 unreachable0 failed0 skipped35 rescued0 ignored0️ 常见问题与解决方案问题1新Pod处于Pending状态原因节点资源不足无法同时运行新旧两个AWX实例解决方法手动删除旧版本Deployment释放资源kubectl -n awx delete deployment awx⚠️ 注意仅删除deployment资源不要删除awx资源或Secrets问题2PostgreSQL版本升级失败解决方案参考tips/upgrade-operator.md中关于PostgreSQL版本变更的特殊处理步骤确保正确创建新的存储卷并迁移数据。问题3升级后AWX无法访问排查步骤检查Pod状态kubectl -n awx get pods查看服务状态kubectl -n awx get services检查Ingress配置kubectl -n awx get ingress 升级最佳实践制定升级计划根据tips/version-mapping.md选择合适的目标版本避免跨多个大版本直接升级测试环境验证在生产环境升级前先在测试环境验证升级流程保留回滚选项升级前的备份确保在出现问题时能够恢复到之前的状态关注版本公告升级前查看AWX Operator发布说明了解重要变更和注意事项通过遵循本文介绍的版本映射关系和升级流程您可以轻松实现awx-on-k3s的平滑升级确保自动化平台始终保持最新功能和安全补丁。完整升级文档可参考tips/upgrade-operator.md获取更多技术细节。【免费下载链接】awx-on-k3sAn example implementation of AWX on single node K3s using AWX Operator, with easy-to-use simplified configuration with ownership of data and passwords.项目地址: https://gitcode.com/gh_mirrors/aw/awx-on-k3s创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考