Cloud-native (75) 썸네일형 리스트형 [Kubernetes]What is RBAC in Kubernetes? (Role based access control) Purpose When lots of users use a cluster, we can seperate access rights with namespace or API. 클러스터 하나를 여러 명이 사용할 때는 API나 네임스페이스별로 권한을 구분해서 권한이 있는곳에만 접근하도록 만들 수 있다. Kubernetes API Access Control type ABAC(Attribute-based access control) access control paradigm whereby access rights are granted to users through the use of policies which combine attributes together. RBAC(Role-based access control).. [Kubernetes]Use TLS certificates as secret in Kubernetes Purpose Create TLS secret for HTTPS use 기존에 떠 있는 ingress에 같은 이름으로 인증서 시크릿 교체시 ingress 나 pod 재시작 없이 인증서 적용 가능하다. Generate openssl Cert for testing HTTPS 인증서를 저장하는 용도로 시크릿을 사용할 수 있다. [dewble@instance-1 secret]$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=example.com" Generating a 2048 bit RSA private key ..........................................+++ .. [Kubernetes]Kubernetes ETCD backup and restore Check ETCD information check ETCD version kubectl describe pod etcd-controlplane -n kube-system At what address do you reach the ETCD cluster from you master node? check listen urls(endpoint) kubectl describe pod etcd-controlplane -n kube-system ## 중략 --listen-client-urls=https://127.0.0.1:2379,https://172.17.0.62:2379 ETCD server certificate file located find server cert kubectl describe pod et.. [Kubernetes]Check cluster IPs range in Kubernetes Purpose Check cluster IPs range Services IP range kubectl cluster-info dump | grep -m 1 service-cluster-ip-range "--service-cluster-ip-range=10.96.0.0/12", Pods IP range kubectl cluster-info dump | grep -m 1 cluster-cidr "--cluster-cidr=10.254.0.0/16", [Kubernetes]Kubernetes Health checks using API The Kubernetes API server provides 2 API endpoints (livez and readyz) to indicate the current status of the API server. There are 2 ways to health check 1. Health check with endpoint Get cluster endpoint kubectl cluster-info >>> Kubernetes control plane is running at https://10.50.103.133:8443 CoreDNS is running at https://10.50.103.133:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/pr.. [Kubernetes]Dynamic Provisioning with NFS in Kubernetes Purpose PVC를 생성할 때 PV 가 자동으로 생성되는 Dynamic Provisioning 을 NFS 기반으로 운영 1. Create Service Account - API 인증 구성 provisioner가 사용할 Service Account(nfs-pod-provisioner-sa)를 만들어 ClusterRole을 통해 pv와 pvc에 [get, list, watch, create, delete] 권한을 가질 수 있도록 API 인증을 구성 kind: ServiceAccount apiVersion: v1 metadata: name: nfs-pod-provisioner-sa --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadat.. [Kubernetes]How to create pv and pvc in kubernetes 아래 템플릿을 사용하여 hostpath pv,pvc 를 생성할 수 있다. PersistentVolume Template pv-hostpath.yaml apiVersion: v1 kind: PersistentVolume metadata: name: pv-hostpath spec: capacity: storage: 2Gi #1 스토리지 용량 volumeMode: Filesystem #2 accessModes: #3 - ReadWriteOnce storageClassName: manual #4 persistentVolumeReclaimPolicy: Delete #5 hostPath: #6 path: /data/storage/test-pv [dewble@instance-1 volume]$ kubectl -f a.. [Kubernetes]What are PV and PVC in Kubernetes? Concept PersistentVolume A piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. 퍼시스턴트볼륨 (PV)은 관리자가 프로비저닝 하거나 스토리지 클래스를 사용하여 동적으로 프로비저닝 한 클러스터의 스토리지이다. 노드가 클러스터 리소스인 것처럼 PV는 클러스터 리소스이다. PV는 Volumes와 같은 볼륨 플러그인이지만, PV를 사용하는 개별 파드와는 별개의 라이프사이클을 가진다. 이 API 오브젝트는 NFS, iSCSI 또는 클라우드 공급자별 스토리지 시스템 등 스토리지 구현에 대한 세부 정보를 담아낸다. Pers.. 이전 1 2 3 4 5 6 7 ··· 10 다음