随笔分类 - Kubernetes
摘要:考试版本:1.25.2 考试价格:原价395刀(一直在涨价,Cyber Monday 单门-50%,两门-65%) 注意点: 考试选中文证书无差别,只要 Verify Name 时填对(根据汇率可能会便宜几块钱) 购买后用考试券在1年内参加,如果第一次未通过,免费的 retake 也是按购买时间算的
阅读全文
摘要:Question 1 (12') Question Create a new service account with the name pvviewer. Grant this Service account access to list all PersistentVolumes in the
阅读全文
摘要:Question 1 (10') Take a backup of the etcd cluster and save it to /opt/etcd-backup.db. Details Backup Completed Solution Run the following command to
阅读全文
摘要:Question 1 (15') Upgrade the current version of kubernetes from 1.23.0 to 1.24.0 exactly using the kubeadm utility. Make sure that the upgrade is carr
阅读全文
摘要:Application Failure 查看Service的状态 使用应用程序或者 curl 检查是否可以在节点端口的IP上访问web服务器 curl http://web-service-ip:node-port 检查服务 kubectl describe svc web-service 的End
阅读全文
摘要:学习资料 Udemy 配合 kodekloud + 官方文档 食用 经验贴 LinuxFoundation官方手册:包含考试要求、报销等 CKA 认证笔记 - CKA 认证经验帖:2022年2月考试经验,真题模糊描述 CKA考试经验:报考和考纲:考试经验整理 CKA、CKAD考试经验Github:知
阅读全文
摘要:Service Networking Service承载在整个cluster上,整个cluster的pod都可以访问到这个节点,Service没有绑定到特定节点,但只能从集群内部访问该服务。 NodePort可以不仅让cluster内部的节点访问,它还会再cluster中所有节点的端口上公开appl
阅读全文
摘要:Cluster Networking kubernetes集群由master node和worker node组成。每个节点必须至少有一个连接到网络的接口,每个接口必须配置一个IP地址,host必须设置唯一的主机名以及唯一的mac地址。如果通过现在VM克隆来创建VM,则应特别注意这一点。还有一些端口
阅读全文
摘要:Docker Networking 当您运行容器时,您有不同的网络选项可供选择: container无法到达外部,外部也无法访问container docker run --network none nginx 容器链接到host,host和容器之间没有网络隔离无需接口转发,但两个进程无法同时侦听同
阅读全文
摘要:Network Namespace Docker等容器使用namespace来实现网络隔离,容器是使用namespace与底层主机分离的。如果把host当成房子,那么namespace就是房子里你分配给每个孩子的房间。 就容器而言,它只看到由它运行的进程,并认为它是独立的。但是,底层host可以看到
阅读全文
摘要:Switching ip link:用于列出和修改host上的接口, ip link只能看链路层的状态,看不到ip地址 ip addr:查看分配给这些接口的IP地址,即使网卡处于down状态,也能显示出网卡状态,但是ifconfig查看就看不到 cat /etc/network/interfaces
阅读全文
摘要:Volumes !!!注意题目给的 mountPath 后面有没有 /,可能会判定为不同路径。 apiVersion: v1 kind: Pod metadata: name: random-number-generator spec: containers: - image: alpine nam
阅读全文
摘要:Storage 安装Docker后,默认存储路径: /var/lib/docker |- aufs |- containers |- image |- volumes 对于Dockerfile buid时的分层架构: Dockerfile FROM Ubuntu RUN apt-get update
阅读全文
摘要:Network Policy apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: db-policy spec: podSelector: matchLabels: role: db policyTypes: -
阅读全文
摘要:Service Accounts kubectl create serviceaccount dashboard-sa kubectl get serviceaccount kubectl describe serviceaccount dashboard-sa 当创建Service Account
阅读全文
摘要:集群层面请使用 ClusterRole 和 ClusterRoleBindings developer-role.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: developer rules: - a
阅读全文
摘要:使用访问API获取pods信息: curl https://my-kube-playground:6443/api/v1/pods \ --key admin.key --cert admin.crt --cacert ca.crt 用kubectl达成相同的目的: kubectl get pods
阅读全文
摘要:用户创建key: openssl genrsa -out jane.key 2048 用户把key发给admin,admin用这个key创建certificate signing request对象: openssl req -new -key jane.key -subj "/CN=jane" -
阅读全文
摘要:证书创建 证书生成工具:easyrsa、openssl、cfssl 生成CA certificate步骤: Generate Keys openssl genrsa -out ca.key 2048 Certificate Signing Request openssl req -new -key
阅读全文
摘要:查看Common Name (CN):openssl x509 -in /etc/kubernetes/pki/apiserver.crt -text Symmetric Encryption:对称加密,使用相同的密钥来加密和解密数据,必须在发送方和接收方之间交换,因此存在风险 Asymmetric
阅读全文