Kubernetes-ArgoCD篇-02-安装

1、安装

1.1 Argo CD CLI

mac安装:

brew install argocd

通用安装:

# 查看os
go env GOOS
# 查看架构
go env GOARCH
argoCdName="argocd-darwin-arm64"
# 此步骤也可以手动下载
wget https://github.com/argoproj/argo-cd/releases/latest/download/$argoCdName -O $argoCdName 
sudo install -m 555 $argoCdName /usr/local/bin/argocd && rm $argoCdName

1.2 argo CD安装

需要在 Kubernetes 集群中安装 Argo CD:

kubectl create namespace argocd
wget https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml -O argocd.yaml
kubectl apply -n argocd -f argocd.yaml

结果:

$ kubectl apply -n argocd -f argocd.yaml
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/applicationsets.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io created
serviceaccount/argocd-application-controller created
serviceaccount/argocd-applicationset-controller created
serviceaccount/argocd-dex-server created
serviceaccount/argocd-notifications-controller created
serviceaccount/argocd-redis created
serviceaccount/argocd-repo-server created
serviceaccount/argocd-server created
role.rbac.authorization.k8s.io/argocd-application-controller created
role.rbac.authorization.k8s.io/argocd-applicationset-controller created
role.rbac.authorization.k8s.io/argocd-dex-server created
role.rbac.authorization.k8s.io/argocd-notifications-controller created
role.rbac.authorization.k8s.io/argocd-redis created
role.rbac.authorization.k8s.io/argocd-server created
clusterrole.rbac.authorization.k8s.io/argocd-application-controller created
clusterrole.rbac.authorization.k8s.io/argocd-applicationset-controller created
clusterrole.rbac.authorization.k8s.io/argocd-server created
rolebinding.rbac.authorization.k8s.io/argocd-application-controller created
rolebinding.rbac.authorization.k8s.io/argocd-applicationset-controller created
rolebinding.rbac.authorization.k8s.io/argocd-dex-server created
rolebinding.rbac.authorization.k8s.io/argocd-notifications-controller created
rolebinding.rbac.authorization.k8s.io/argocd-redis created
rolebinding.rbac.authorization.k8s.io/argocd-server created
clusterrolebinding.rbac.authorization.k8s.io/argocd-application-controller created
clusterrolebinding.rbac.authorization.k8s.io/argocd-applicationset-controller created
clusterrolebinding.rbac.authorization.k8s.io/argocd-server created
configmap/argocd-cm created
configmap/argocd-cmd-params-cm created
configmap/argocd-gpg-keys-cm created
configmap/argocd-notifications-cm created
configmap/argocd-rbac-cm created
configmap/argocd-ssh-known-hosts-cm created
configmap/argocd-tls-certs-cm created
secret/argocd-notifications-secret created
secret/argocd-secret created
service/argocd-applicationset-controller created
service/argocd-dex-server created
service/argocd-metrics created
service/argocd-notifications-controller-metrics created
service/argocd-redis created
service/argocd-repo-server created
service/argocd-server created
service/argocd-server-metrics created
deployment.apps/argocd-applicationset-controller created
deployment.apps/argocd-dex-server created
deployment.apps/argocd-notifications-controller created
deployment.apps/argocd-redis created
deployment.apps/argocd-repo-server created
deployment.apps/argocd-server created
statefulset.apps/argocd-application-controller created
networkpolicy.networking.k8s.io/argocd-application-controller-network-policy created
networkpolicy.networking.k8s.io/argocd-applicationset-controller-network-policy created
networkpolicy.networking.k8s.io/argocd-dex-server-network-policy created
networkpolicy.networking.k8s.io/argocd-notifications-controller-network-policy created
networkpolicy.networking.k8s.io/argocd-redis-network-policy created
networkpolicy.networking.k8s.io/argocd-repo-server-network-policy created
networkpolicy.networking.k8s.io/argocd-server-network-policy created

看下运行状态:

$ kubectl get pods -n argocd -owide
NAME                                                READY   STATUS             RESTARTS   AGE     IP           NODE                    NOMINATED NODE   READINESS GATES
argocd-application-controller-0                     1/1     Running            0          8m13s   10.244.3.4   myk8s-test-04-worker2   <none>           <none>
argocd-applicationset-controller-5b866bf4f7-rn9dw   1/1     Running            0          8m14s   10.244.3.3   myk8s-test-04-worker2   <none>           <none>
argocd-dex-server-7b6987df7-w9w7d                   0/1     PodInitializing    0          8m14s   10.244.5.3   myk8s-test-04-worker    <none>           <none>
argocd-notifications-controller-5ddc4fdfb9-ds96w    1/1     Running            0          8m14s   10.244.5.4   myk8s-test-04-worker    <none>           <none>
argocd-redis-ffccd77b9-qbg8p                        0/1     ImagePullBackOff   0          8m14s   10.244.4.3   myk8s-test-04-worker3   <none>           <none>
argocd-repo-server-55bb7b784-st9p2                  0/1     PodInitializing    0          8m14s   10.244.5.2   myk8s-test-04-worker    <none>           <none>
argocd-server-7c746df554-l22gn                      1/1     Running            0          8m14s   10.244.4.4   myk8s-test-04-worker3   <none>           <none>

发现redis的pod拉取镜像失败(ImagePullBackOff):

$ kubectl describe pod/argocd-redis-ffccd77b9-qbg8p  -n argocd
...Warning  Failed     3m38s                  kubelet            Failed to pull image "redis:7.0.15-alpine": rpc error: code = DeadlineExceeded desc = failed to pull and unpack image "docker.io/library/redis:7.0.15-alpine": failed to resolve reference "docker.io/library/redis:7.0.15-alpine": failed to do request: Head "https://registry-1.docker.io/v2/library/redis/manifests/7.0.15-alpine": dial tcp 69.63.176.59:443: i/o timeout

我们要将argocd.yaml里面redis的镜像处理下,目前使用的镜像为:redis:7.0.15-alpine
替换为:m.daocloud.io/docker.io/library/redis:7.0.15-alpine

重新执行apply触发更新,两个pod依然处于PodInitializing状态:

$ kubectl get pods -n argocd -owide
NAME                                                READY   STATUS            RESTARTS   AGE     IP           NODE                    NOMINATED NODE   READINESS GATES
argocd-application-controller-0                     1/1     Running           0          18m     10.244.3.4   myk8s-test-04-worker2   <none>           <none>
argocd-applicationset-controller-5b866bf4f7-rn9dw   1/1     Running           0          18m     10.244.3.3   myk8s-test-04-worker2   <none>           <none>
argocd-dex-server-7b6987df7-w9w7d                   0/1     PodInitializing   0          18m     10.244.5.3   myk8s-test-04-worker    <none>           <none>
argocd-notifications-controller-5ddc4fdfb9-ds96w    1/1     Running           0          18m     10.244.5.4   myk8s-test-04-worker    <none>           <none>
argocd-redis-6cf75846cf-n7xc8                       1/1     Running           0          2m33s   10.244.3.5   myk8s-test-04-worker2   <none>           <none>
argocd-repo-server-55bb7b784-st9p2                  0/1     PodInitializing   0          18m     10.244.5.2   myk8s-test-04-worker    <none>           <none>
argocd-server-7c746df554-l22gn                      1/1     Running           0          18m     10.244.4.4   myk8s-test-04-worker3   <none>           <none>

看下具体情况:

$ kubectl describe pod/argocd-dex-server-7b6987df7-w9w7d -n argocd
Events:Type    Reason     Age   From               Message----    ------     ----  ----               -------Normal  Scheduled  18m   default-scheduler  Successfully assigned argocd/argocd-dex-server-7b6987df7-w9w7d to myk8s-test-04-workerNormal  Pulling    18m   kubelet            Pulling image "quay.io/argoproj/argocd:v2.12.3"Normal  Pulled     15m   kubelet            Successfully pulled image "quay.io/argoproj/argocd:v2.12.3" in 2m44.389s (2m44.389s including waiting). Image size: 164423443 bytes.Normal  Created    15m   kubelet            Created container copyutilNormal  Started    15m   kubelet            Started container copyutilNormal  Pulling    15m   kubelet            Pulling image "ghcr.io/dexidp/dex:v2.38.0"kubectl describe pod/argocd-repo-server-55bb7b784-st9p2 -n argocd
Events:Type    Reason     Age   From               Message----    ------     ----  ----               -------Normal  Scheduled  19m   default-scheduler  Successfully assigned argocd/argocd-repo-server-55bb7b784-st9p2 to myk8s-test-04-workerNormal  Pulling    19m   kubelet            Pulling image "quay.io/argoproj/argocd:v2.12.3"Normal  Pulled     16m   kubelet            Successfully pulled image "quay.io/argoproj/argocd:v2.12.3" in 1.274s (2m45.655s including waiting). Image size: 164423443 bytes.Normal  Created    16m   kubelet            Created container copyutilNormal  Started    16m   kubelet            Started container copyutilNormal  Pulling    16m   kubelet            Pulling image "quay.io/argoproj/argocd:v2.12.3"

看样子都是拉取镜像存在问题,这个是预期内的,我们来修改下涉及到的几个镜像:

  • quay.io/argoproj/argocd:v2.12.3 -> m.daocloud.io/quay.io/argoproj/argocd:v2.12.3
  • ghcr.io/dexidp/dex:v2.38.0 -> m.daocloud.io/ghcr.io/dexidp/dex:v2.38.0

重新执行apply触发更新,查看状态:

$ kubectl get pods -n argocd -owide
argocd-application-controller-0                     1/1     Running   0          3m21s   10.244.3.8    myk8s-test-04-worker2   <none>           <none>
argocd-applicationset-controller-6b4b8d7f46-dk5rh   1/1     Running   0          3m22s   10.244.5.9    myk8s-test-04-worker    <none>           <none>
argocd-dex-server-5dfd9d87f9-6c6mr                  1/1     Running   0          3m22s   10.244.4.8    myk8s-test-04-worker3   <none>           <none>
argocd-notifications-controller-74776f498-fgft4     1/1     Running   0          3m22s   10.244.5.8    myk8s-test-04-worker    <none>           <none>
argocd-redis-6df74cbc6b-jkl27                       1/1     Running   0          3m22s   10.244.3.7    myk8s-test-04-worker2   <none>           <none>
argocd-repo-server-76797b784b-tfgvl                 1/1     Running   0          3m22s   10.244.5.10   myk8s-test-04-worker    <none>           <none>
argocd-server-8457c864bf-qk22l                      1/1     Running   0          3m21s   10.244.4.9    myk8s-test-04-worker3   <none>           <none>

2、访问Argo CD

2.1 转发端口

我们这里通过port-forward 访问 Argo CD 的 Web 界面:

kubectl port-forward svc/argocd-server -n argocd 8080:443

结果:

$ kubectl port-forward svc/argocd-server -n argocd 8080:443
Forwarding from 127.0.0.1:8080 -> 8080
Forwarding from [::1]:8080 -> 8080

然后在浏览器中访问 https://localhost:8080。默认的用户名是 admin,可以通过以下命令获取初始密码:

kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d

请添加图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/9530.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

【Ant Design Pro】框架入门的起手式及架构的分析

框架千千万万&#xff0c;换个公司换个样&#xff01;umijs官网地址在这里&#xff0c;都要喊它father!! 作为笔记&#xff0c;了解框架结构。官网地址:Ant Design Pro。 项目环境 node 版本18依赖安装淘宝镜像&#xff0c;npm i大概要2~3分钟&#xff0c;感觉这种框架很重 安…

【数据分享】2024年我国省市县三级的生活服务设施数量(46类设施/Excel/Shp格式)

人才市场、售票处、旅行社等生活服务设施的配置情况是一个城市公共基础设施完善程度的重要体现&#xff0c;一个城市生活服务设施种类越丰富&#xff0c;数量越多&#xff0c;通常能表示这个城市的公共服务水平越高&#xff01; 本次我们为大家带来的是我国各省份、各地级市、…

采用 EtherCAT 的磁场定向控制 (FOC) 伺服运动控制器 IC-TMC8670-BI

这款芯片是小型去中心化机器人的理想解决方案&#xff0c;还十分适合机器人和工业自动化、实验室自动化、工业物联网应用以及嵌入式运动控制系统中的典型编码器&#xff0c;使其更加全能。 TMC8670是用于工业自动化、嵌入式伺服控制和其他自动化设备应用的单轴伺服电机控制器。…

【Melty是一款开源的AI编程助手,基于codellama,媲美cusor】

https://github.com/meltylabs/melty.git 对话进行代码重构

今日力扣:3235. 判断矩形的两个角落是否可达

给你两个正整数 xCorner 和 yCorner 和一个二维整数数组 circles &#xff0c;其中 circles[i] [xi, yi, ri] 表示一个圆心在 (xi, yi) 半径为 ri 的圆。 坐标平面内有一个左下角在原点&#xff0c;右上角在 (xCorner, yCorner) 的矩形。你需要判断是否存在一条从左下角到右上…

HCIP-HarmonyOS Application Developer 习题(二十)

1、&#xff08;判断题&#xff09;在使用 EventHandler 实现线程问通信时如果 EventRurner取出的是InnerEvent事件&#xff0c;则 EventRunner 会直接在新线程上处理该事件。 答案&#xff1a;错误 分析&#xff1a;如果EventRunner取出的事件为InnerEvent事件&#xff0c;则触…

恭喜!2024年度大连市科技人才创新、科技人才创业项目拟立项公示!

精选SCI/SSCI/EI SCI&EI ●IEEE 1区TOP 计算机类&#xff08;含CCF&#xff09;&#xff1b; ●EI快刊&#xff1a;最快1周录用&#xff01; 知网(CNKI)、谷歌学术期刊 ●7天录用-检索&#xff08;100%录用&#xff09;&#xff0c;1周上线&#xff1b; 免费稿件评估 …

CSS3中动画的使用animation

1.基本使用 2.其他属性 3.复合属性

C语言多维数组抽象理解:切格子思维

其实早在两年前我就写过一篇关于多维数组的文章&#xff1a;详解多维数组与指针之间的关系&#xff0c;随着时间的推移&#xff0c;我的工作与学习逐渐深入&#xff0c;对C语言有了更深入的理解&#xff0c;觉得之前写的文章里关于多维数组部分有些复杂&#xff0c;不能以最简单…

超越Axure:探索新一代原型设计工具

Axure RP是一款被广泛认可的快速原型设计工具&#xff0c;专为专业设计师打造&#xff0c;用于创建高效的产品原型图&#xff0c;包括APP和网页的原型图、框架图和结构图等。Axure RP制作的原型图能够实现与实际APP相似的交互效果&#xff0c;便于向用户或客户展示&#xff0c;…

PVE纵览-从零开始:了解Proxmox Virtual Environment

PVE纵览-从零开始&#xff1a;了解Proxmox Virtual Environment 文章目录 PVE纵览-从零开始&#xff1a;了解Proxmox Virtual Environment摘要引言什么是Proxmox Virtual EnvironmentPVE的核心功能PVE 优势如何开始使用PVEPVE应用案例总结 关键字&#xff1a; PVE、 虚拟机、…

装杯 之 Linux指令【补充篇】

“生活就像海洋&#xff0c;只有意志坚强的人&#xff0c;才能到达彼岸” ---马克思 目录 1.grep指令 ​编辑 2.zip/unzip指令 3.tar指令&#xff08;重要&#xff09;&#xff1a;打包/解包&#xff0c;不打开它&#xff0c;直接看内容 4.bc指令 5.uname 指令 1.grep…

AI自动直播软件之直播任务模块开发!

AI自动直播软件&#xff0c;作为现代科技与传统直播行业的完美结合&#xff0c;正在逐步改变我们的生活方式&#xff0c;它不仅能够帮助主播们实现24小时不间断的直播&#xff0c;还能通过智能算法分析观众喜好&#xff0c;推送定制化的内容&#xff0c;极大地提升了用户体验。…

windows工具 -- 开源图片查看器ImageClass

目的 windows自带的图像查看有些不好用 ImageClass效果 下载安装 点击下载 ImageClass https://imageglass.org/releases 双击安装即可 如果想要和一样的布局可以参考 下图布局设置: 其他功能自行探索一下, 功能很丰富

99_api_intro_websitetools_dnslookup

域名 DNS 信息查询 API 数据接口 网络工具&#xff0c;多种记录类型数据返回&#xff0c;丰富的信息结构&#xff0c;毫秒级响应。 1. 产品功能 提供域名 DNS 解析完整记录&#xff1b;丰富的解析记录类型&#xff0c;包括&#xff1a;A, AAAA, MX, TXT, NS, CNAME, SRV, PTR, …

Intern大模型训练营(五):书生大模型全链路开源体系笔记

观看视频&#xff0c;可以比较详细地了解到书生大模型全链路开源体系。 其中有几个印象比较深的点&#xff1a; 这张图讲述了书生浦语大模型开源的发展史&#xff0c;同时与主流的llama和Chatgpt模型进行比较&#xff0c;可以看出在参数上&#xff0c;InterLM在努力追赶甚至超…

ONLYOFFICE 8.2 版:助力自动化办公的佼佼者

0. 引言 在当今数字化办公的浪潮中&#xff0c;办公软件的选择对于提高工作效率和质量至关重要。就像在算法的世界里&#xff0c;合适的算法能高效地解决问题一样&#xff0c;一款优秀的办公软件能为我们的办公流程带来前所未有的便捷。ONLYOFFICE 8.2 版的出现&#xff0c;为…

03集合基础

目录 1.集合 Collection Map 常用集合 List 接口及其实现 Set 接口及其实现 Map 接口及其实现 Queue 接口及其实现 Deque 接口及其实现 Stack类 并发集合类 工具类 2.ArrayList 3.LinkedList 单向链表的实现 1. 节点类&#xff08;Node&#xff09; 2. 链表类&a…

6KBhtm+js实现提交名单随机抽取功能适用活动或课堂随机点名

<!DOCTYPE html> <html lang"zh"> <head> <meta charset"UTF-8"> <meta name"viewport" content"widthdevice-width, initial-scale1.0"> <title>名单抽奖系统</title> <style> *{ma…

面向对象的需求分析和设计(一)

[toc] 1. 引言 前一篇文章《我对需求分析的理解》提到了面向对象分析和设计&#xff0c;正好最近又重新有重点的读了谭云杰著的《Think in UML》&#xff0c;感觉有必要写把书中一些核心内容观点以及自己的想法整理出来&#xff0c;一是方便自己日后的复习&#xff0c;另外也…