Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
GitOpsã§ç§å¿æ å ±ãæ±ãæ¹æ³ãç´¹ä»ããè³æã§ããSealedSecretã¨ãããã¼ã«ãä¸å¿ã«ç´¹ä»ãã¾ããããã以å¤ã®kamus, Hashicorp Vault, kubesealã¨ãã£ãå¤ãã®ãã¼ã«ãç´¹ä»ãã¾ãã @Kubernetes Meetup Tokyo #21 - Cloud Native CI/CD
$ minikube start ð minikube v1.0.0 on darwin (amd64) 𤹠Downloading Kubernetes v1.14.0 images in the background ... ð¥ Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ... ð¿ Downloading Minikube ISO ... 142.88 MB / 142.88 MB [============================================] 100.00% 0s ð¶ "minikube" IP address is 192.168.99.122 ð³ Configuring Docker as the container runtime ... ð³ Versio
ããã¾ãã¦ããã§ã¨ããããã¾ãããµã¤ãªã¹ãã¯ããã¸ã¼æè¡é¨ æ¦äºã§ããæ¬æ¥ã¯å æ¦ã§ããä»å¹´æåã®ããã°ã¯ãKubernetesã§RollingUpdateããããã«Podãå®å ¨ã«çµäºããããã«å¿ è¦ãªè¨å®ãæ¸ãã¾ãã Podçµäºã¾ã§ã®ã·ã¼ã±ã³ã¹ Podãçµäºããããã®ã·ã¼ã±ã³ã¹ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã kubetctlããPodãçµäºããããã®ãªã¯ã¨ã¹ããAPI Serverã«éä¿¡ããã kubeletããPodçµäºã®ãªã¯ã¨ã¹ããAPI Serverçµç±ã§åãåããPodã®çµäºå¦çãéå§ããã ããµã¼ãã¹ããPodãé¤å¤ããå¦çãã¨ãpreStop(ãªãã·ã§ã³)+SIGTERMãPodã«éä¿¡ãããã¨ãã2ã¤ã®å¦çãåæã«éå§ããããããã®å¦çã¯å®å ¨ã«éåæã§è¡ããã äºåã«å®ç¾©ããterminationGracePeriodSecondsç§ä»¥å ã«3ã®å¦çãçµãããªãã£ãå ´åãPodã«SIGK
Kubernetesç°å¢ã§CI/CDãå®ç¾ãããGitOpsãã«ã¤ãã¦ã @ãããã®å¤ã¹ Docker/Kubernetesãã¤ã ãåããã質åã®ä¸é¨ã¯ãã¡ãã®ãã¤ã¼ãã«ç´ã¥ãå½¢ã§åçãã¦ãã¾ãâhttps://twitter.com/amaya382/status/1140575485878886400
ã¯ããã« ãã¯ãããããã¾ã、å è¤ã§ã。CKAãåãããã¨æã£ã¦ãã¾ããã、åå¼·ããæéãã¨ãã、ç³ãè¾¼ã¿ãè±èªã§ã¾ãã§ç解ã§ããªãã£ãã®ã§ããã£ã¦è¾ãã¾ãã。 ã¨ããããã§ï½¤EKSã§Horizontal Pod Autoscaling 㨠Cluster Autoscaler ãè¨å®ãã¦ã¿ã¾ãã。 説æ Horizontal Pod Autoscaler - Kubernetes Horizontal Pod Autoscaling(以é、HPA)ã¯CPUè² è·ãªã©ã¡ããªã¯ã¹ã«å¿ãã¦Deploymentã«å½ä»¤ãéãReplicaæ°ãå¶å¾¡ããæ©è½ã§ã。 ã³ã³ããã«ä¸ãããªã½ã¼ã¹ã¯å¤ããã«ï½¤åæå®è¡ãå¢æ¸ããã¾ã。ã¤ã¾ã、ã¹ã±ã¼ã«ã¤ã³/ã¢ã¦ããè¡ãã¾ã。 Horizontal Pod Autoscaler ã§å©ç¨å¯è½ãªã¡ããªã¯ã¹ã¯ä¸è¨ãããã¾ã。 1 Resource CPU/ã¡ã¢ãªã®ãªã½ã¼ã¹
Kubernetes Advent Calendar 2019 ãã®3 ã® 2æ¥ç®ã§ãã Weaveworksã«ãã£ã¦GitOpsãææ¡ããã¦ãã2å¹´ã»ã©ãçµã¡ãå ãã§ããæ¬çªå°å ¥äºä¾ãè³ã«ããããã«ãªãã¾ãããã¨ã¯ããæ¡å¤ã¾ã¨ã¾ã£ãããã¥ã¡ã³ãã¯ä½ããã¦ãã¾ãããç¹ã«GitOpsã§è¤æ°ã®ç°å¢ (e.g., éçºç°å¢ãæ¬çªç°å¢ãetc.) ããã³ããªã³ã°ããããã«ã¯æ¬ ãããªããã©ã³ãæ¦ç¥ã«ã¤ãã¦ã¯æ®ã©èªããã¦ããªãããã§ããããã§ã¯ãã¨ãGitOpsã®æ¦è¦ (Single Source of Truthã®æ¦å¿µç) ãç¥ã£ã¦ãã¦ãæ¬çªå°å ¥ã«ã¯å¤§ããªãã¼ãã«ãæ®ã£ãã¾ã¾ã§ãæ¬çªå°å ¥äºä¾ãã¾ã ã¾ã å°ãªããã¨ã«ãç´å¾ã§ãã¦ãã¾ãã¾ããããã§ãã®è¨äºã§ã¯ãã©ã³ãæ¦ç¥ã«ç¦ç¹ãå½ã¦ããµã³ãã«ããã¸ã§ã¯ãã交ããªããç´¹ä»ãã¦ãããã¨æãã¾ããk8s/GitOpsä¸ç´è åãã§ããå¤åã 以åGitOpsã«ã¤
Linuxçµé¨ã¼ãããCKADï¼Certified Kubernetes Application Developerï¼ã«åæ ¼ããã¾ã§kubernetesckad ãã®è¨äºã«ã¤ã㦠ãã®åº¦ãCloud Native Computing Foundationãèªå®ããKubernetesã®éçºè åãè³æ ¼ãCertified Kubernetes Application Developerï¼CKADï¼ãã«åæ ¼ãããã¨ãã§ãã¾ããï¼ åæ ¼è¨¼â ãã®è¨äºã§ã¯ãè³æ ¼ã«åããåå¼·æ¹æ³ãªã©ãå ±æãããã¨æãã¾ãã å®ç§ç¾©åãããããããã©ããªåé¡ãåºãããã¯æ¸ãã¦ãã¾ãã åã®åæç¥è åã®ãã£ãªã¢ã¯Javaéçºè ããå§ã¾ãããã®å¾ã¯é·ãJavaç³»ã®ç ä¿®è¬å¸«ããã¦ãã¾ããæ å½ããç ä¿®ã¯ã»ã¨ãã©ãSpringãJava EEãªã©ã®ã¢ããªã±ã¼ã·ã§ã³éçºç³»ã§ãããå®åã»ç ä¿®ã¨ãã¤ã³ãã©ç³»ã®çµé¨ã¯ã»ã¨ãã©ããã¾ã
Motivation Prometheus ã«ã¯ Service Discovery ã¨ããæ©è½ããããç£è¦å¯¾è±¡ã®ãã¼ããèªåçã«è£è¶³ã対象ã«è¿½å ããäºãå¯è½ã§ãã (https://prometheus.io/docs/prometheus/latest/configuration/configuration/ ã® **_sd_config ããããã®è¨å®ã«ãªãã¾ãã) æè¿ã¯ Kubernetes ãªã©ã® Docker orchestration tool ã®æ®åã«ããç£è¦å¯¾è±¡ãåçã«å¤åããç°å¢ãå¤ããAuto Scaling / Self Healing ã«èªåçã«è¿½éãã¦ç£è¦ãè¡ã£ã¦ããããã¼ã«ã®å¿ é 度ãé«ããªã£ã¦ãã¾ãã å人çã«ã¯ Datadog ã好ããªã®ã§ãåæ§ãªæ©è½ã Datadog ã«ãããã¨è¯ããªãã¨æã£ã¦ããã®ã§ããã Datadog ã§ã AutoDiscove
ããã«ã¡ã¯ãNecoããã¸ã§ã¯ãã®satã§ãã æ¬è¨äºã§ã¯Kubernetes(以ä¸K8sã¨è¨è¼)ã¢ããªã±ã¼ã·ã§ã³(以éã¢ããªã¨è¨è¼)ã®éçºãé«éåãããã¼ã«ãTelepresenceãç´¹ä»ãã¾ãã æåã«çµè«ãæ¸ãã¦ããã¨ãTelepresenceã¯æ¬¡ã®ãããªãã¼ã«ã§ãã ãã¼ã«ã«ã§åãããã»ã¹ãã³ã³ãããk8sã¯ã©ã¹ã¿ã®ä¸ã§åããã æ¢åã®Deploymentå ã®ã³ã³ãããä¸è¨ãã¼ã«ã«ã³ã³ããã§ç½®ãæãããã ãã¹ãããããã°ã®ããã«ãã¡ãã¡ã³ã³ããã¤ã¡ã¼ã¸ãã¬ã¸ã¹ããªã«push,ããããpullâ¦ã¨ããå¿ è¦ããªãã®ã§éçºé度ãä¸ãããã Telepresenceã¯ç¾å¨Cloud Native Computing Foundationã®SandBoxããã¸ã§ã¯ãã§ãã Telepresenceç»å ´ã®èæ¯ åç¯ã«ããã¦"éçºãé«éåãã"ã¨æ¸ãã¾ããããã¾ãã¯Telepresenceã使
## ãã¼ã«ã«ã§k8s ã¡ãã£ã¨è©¦ãã¦ã¿ããã¨ãã¨ãã«ããã¼ã«ã«ã§k8sãåããããã¦ã以åã ã¨Minikubeã¨ãDockerã«ã¤ãã¦ããk8sã¨ãã使ã£ããã¨ããããã©ãä»ã ã¨ã¾ãä½ãåºã¦ãããªï¼ã¨æã£ã¦ããããããã¹ã¬ãããè¦ã¤ããã K3s, minikube or microk8s? : kubernetes Minikube Microk8s K3s Kind Desktop Docker K3d Kubeadm ãç´¹ä»ããã¦ããã¸ã¼ãã¨æã£ã¦ããªãã¨ãªãk3dãé¢ç½ããããªã¨æã£ãã®ã§è©¦ãã¦ã¿ãã ## k3d https://github.com/rancher/k3d ç´¹ä»ããã¦ããä¸è¦§ã®ä¸ã«ããk3sãDockerã§åããã¦ãããã®ãk3dã¨ãããã¨ã¿ãããDockerãåãããã©ãããã©ã¼ã ãDockerã®ä¸ã§åãã»ã»ã»ãï¼ããããããã åã¯Ubuntu使ã£ã¦ããã
ããã«ã¡ã¯ãNecoããã¸ã§ã¯ãã®satã§ããä»åã¯Kubernetesã¯ã©ã¹ã¿ãæ軽ã«ä½ããkindã¨ãããã¼ã«ãç´¹ä»ãã¾ããkindã¯Kubernetes In Dockerã®ç¥ã§ãã æ¬è¨äºã®è¦ç´ kindã¨ã¯Kubernetesã¯ã©ã¹ã¿ãç°¡åã«ä½ãããã¼ã« ã¤ã³ã¹ãã¼ã«ãããã³ã¯ã©ã¹ã¿ä½æããããããã£ã1ã³ãã³ããå®è¡ããã ãã§å®äº ä»ã®é¡ä¼¼ãã¼ã«ã«ã¯åå¨ããªããã«ããã¼ãã¯ã©ã¹ã¿ä½ææ©è½ããã Kubernetesã®å ¬å¼ããã¸ã§ã¯ããã¤ãKubernetesãã®ãã®ã®ãã¹ãã«ãç¨ãããã¦ãããããå®ç¸¾ãå°æ¥æ§ã¯åå ä¿®æ£å±¥æ´ 2019/7/04: ãã¯ã©ã¹ã¿ã®è¨å®ãå¤æ´ããæ¹æ³ãç¯ã®apiVersion: kubeadm.k8s.io/v1beta1ãapiVersion: kubeadm.k8s.io/v1beta2ã«ä¿®æ£ãã¾ãã kindã¨ã¯ Kubernetesã¯è¤éãªã½
external-dnsã¨ã¯ [kubernetes-incubator/external-dns] (https://github.com/kubernetes-incubator/external-dns) Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services externa-dnsã¯Kubernetes Incubatorããã¸ã§ã¯ãã®ä¸ã¤ã§ãKubernetesã¦ã¼ã¶ãã¯ã©ã¦ããããã¤ãã®Webã³ã³ã½ã¼ã«ãCLIã使ããã¨ãç°¡åã«DNSã¬ã³ã¼ããä½æã»æ´æ°ãã¦ãµã¼ãã¹ãå ¬éããããã«å©ç¨ãã¾ãã AWSã®å ´åãAWSã³ã³ã½ã¼ã«ãawscliã使ããã¨ãkubectlã ãã§ç°¡åã«Route53ã§ãµã¼ãã¹ãå ¬éãããã¨ã
æè¿åå¼·ãã¦ã AWS EKS ã使ã£ã¦Kubernetes ãããã£ã¦ã¾ãï¼ ããééã£ã¦ãã¨ãããããã° @hatappi ã¾ã§æãã¦ããã ããã¨å¬ããã§ãã ä»åã¯ã©ããªãã¨ããããã£ãã ALBã使ãããï¼ 2ãã¡ã¤ã³ã使ã£ã¦ãã¹ããã¼ã¹ã§ã«ã¼ãã£ã³ã°ããã ALBã¯èªåã§ä½ããã© Routes 53 ã®ã¬ã³ã¼ãã¯æåã§ãã¿ãããªãã¨ã¯ããããªã ãã£ã±ãä»ã®æ代㯠https ã§ããï¼ (ACM) äºåæºå ã¾ãã¯æ¤è¨¼ç°å¢ããªãã¨ãããªãã®ã§ãã¯ã©ã¹ã¿ã¼ã®ä½æããããªãã¾ãã ã¯ã©ã¹ã¿ã¼ã¯ä»¥åæ¸ããè¨äºã§ä½¿ç¨ãã eksctl ã使ç¨ãã¦ä½æãã¦ããã¾ãã blog.hatappi.me ä¾ãã°ãããªæãã§ã¯ã©ã¹ã¿ã¼ãä½æãã¾ãã $ eksctl create cluster --name test --region ap-northeast-1 --nodes 2 --nod
ããã°ã®æ´æ°é »åº¦ãè½ã¡ã¦ãã¾ããããµãã£ã¦ããããã§ã¯ãªãã§ããã ã¯ããmosuke5ã§ãã ãã¯ãKubernetesãããã§ã¹ãã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³ã¯å¿ è¦ã ãã¨æ°ã¥ãã¦ãã¾ã£ãã®ã§ããããã§ã¹ããçæã§ãããã¼ã«ãæ¢ãã¦ãã¾ããã ããã§ãKustomizeã試ãã¿ãã®ã§ã¢ã¦ããããã¨ãã¦æ®ãã¦ããã¾ãã使ã£ã¦ã¿ãä¸ã§ããã£ããã¤ã³ãã注æãã¹ãç¹ãªã©ãå«ãã¦æ¸ãããã¨æãã¾ãã ã¢ããã¼ã·ã§ã³ kubernetesåå¿è ã¨ãã¦ããããã§ã¹ããããã¦ããããkubectl apply -f xxxxã§ããã«ãããã¤ã§ããããæé«ã ãªã£ã¦æã£ã¦ã¾ããã ãããããããéçºç°å¢ã¨æ¬çªç°å¢ã®2ã¤ã®Namespaceã§å©ç¨ããããªã£ãããéç¨ã®ãã¨ãèããã¨ããããã¨ä¸é½åãçºçãã¦ãã¾ããã éçºç°å¢ã¨æ¬çªç°å¢ã§ãã©ã¡ã¼ã¿ãå¤ããããã¨ããã æ¬çªç°å¢ã ãå ¥ããããªã½ã¼ã¹ãããï¼ä¾ãã°L
Jsonnetã¨ããJSONãã³ãã¬ã¼ãè¨èªãç´¹ä»ããã å¾ã§è¦ãããã«ãããã¯JSONãçæããããã®æ±ç¨ãã³ãã¬ã¼ãã¨ããããã¯ããããè¨ç®ãä¾åé¢ä¿ãå«ãè¨å®ãéçã«æ¸ãä¸ãããã«ä¾¿å©ãªã®ã§ã¯ãªããã¨èããããã å®éJsonnetã®ä»æ§ã¯Googleã®BCLã«ä¼¼ã¦ãããBCLã¯Googleã§ã³ã³ããã¯ã©ã¹ã¿ã·ã¹ãã Borgã®è¨å®ãè¨è¿°ããããã«ä½¿ããã¦ããè¨èªã ã JSONãã³ãã¬ã¼ãè¨èª ããæå³ã§Jsonnetã¯æ¯åº¦ããªãã¿ã®ãã¤ã ãJavaScriptã®ææ³ã®ä¸ä¾¿ãã«å¯¾ãã¦alt JSãå¤æ°åºã¦ãããCSSã«ããããã¹ãã®åããã¥ãããã®è¨è¿°ã®éè¤ã«å¯¾ãã¦CSS preprocessorãå¤æ°åºã¦ãããããã¨åãããã«ãã¦ãWebã«ãããæ©æ¢°å¯èªãã¼ã¿ã®Lingua FrancaããJSONãè¨è¿°ããã®ãä¸ä¾¿ãªã®ã§JSONãã³ãã¬ã¼ããåºã¦ããã Jsonnetã¯ãã®ä¸ã®1ã¤
以åã®è¨äºã§ãç´¹ä»ããéããä¸ä¼ã§ã¯ãgRPCã使ã£ããµã¼ãã¹ãå°å ¥ãå§ãã¦ãã¾ãã user-first.ikyu.co.jp ãã®è¨äºã§ã¯ããã®ãµã¼ãã¹ãAmazon EKSã§æä¾ããããã®è¨è¨ãæ°ãã¤ãããã¤ã³ãã«ã¤ãã¦ç´¹ä»ãã¾ãã èæ¯ ä¸ä¼ã§ã¯ãã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ã®å®è¡ç°å¢ã¨ãã¦AWS Elastic Beanstalkãæ¡ç¨ãã¦ãã¾ãã ããã¦ããã®4æããElastic BeanstalkãAmazon EKSã¸ç§»è¡ããããã¸ã§ã¯ããé²ãã¦ãã¾ãã ãã®gRPCãµã¼ãã¹ãElastic Beanstalkã§éç¨ããã¦ãã¾ãããã以ä¸ã®åé¡ãæ±ãã¦ãã¾ããã é©åã«ãã¼ããã©ã³ã·ã³ã°ã§ããªãã Elastic Beanstalkã§gRPCãµã¼ãã¹ãéç¨ãããã¨ããã¨Network Load Balancer(NLB)ã使ããã¨ã«ãªãã¾ããNLBã¯ã¬ã¤ã¤4ã®ãã¼ããã©ã³ãµã§ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}