一、YAML Autogeneration using Kubernetes Extention One of the easiest ways to create Kubernetes YAML is using the visual studio kubernetes extension. Install the Kubernetes VS code extension, and it will help develop k8s manifests for most kubernetes objects. It also supports deploying apps to local and remote k8s clusters. All you have to do is, start typing the Object name and it will automatically populate the options for you. Then, based on your selection, it will autogenerate the basic YAML structure for you as shown n the following image. This extension supports YAML generation of Pods, Deployment, Statefulset, Replicationset, Persistent Volumes (PV), Persistent Volume Claims (PVC), etc. 二、Create YAML Manifest Using Kubectl Dry Run You can create the manifests using the kubectl imperative commands. There is a flag……
A pod can also have one or more containers, one of which is the application container, and the others are the init container, which halts after it completes a job or the application container is ready to perform its function, and the sidecar container, which is affixed to the primary application container. A container or pod will not always leave due to an application failure. In scenarios like this, you will need to restart your Kubernetes Pod explicitly. In this guide, you will explore how to force pods in a deployment to restart using several ways. Pre-requisites To restart the pod using kubectl, make sure you have installed the kubectl tool along with the minikube cluster. Otherwise, you will not be able to implement the prescribed article. Methods to create pods using Kubectl To restart pods using Kubectl, you have……
在现网的一个系统上通过kubectl logs pod名称查看日志时报错a container name must be specified for pod。出现该问题比较容易解决,一般出现该问题的都是多个container共用一个pod的情况,比如sidecar模式下,这时候查看日志的时候需要指定Pod外,还需要通过-c参数指定container。 kubectl-logs-container……
Introduction Containers have revolutionized application development and delivery on account of their ease of use, portability and consistency. And when it comes to automatically deploying and managing containers in the cloud (public, private or hybrid), one of the most popular options today is Kubernetes. Kubernetes is an open source project designed specifically for container orchestration. Kubernetes offers a number of key features, including multiple storage APIs, container health checks, manual or automatic scaling, rolling upgrades and service discovery. Applications can be installed to a Kubernetes cluster via Helm charts, which provide streamlined package management functions. Assumptions and Prerequisites This guide focuses on deploying an example phpbb application in a Kubernetes cluster running on either Huaweicloud CCE or Minikube. This guide makes the following assumptions: You have a Kubernetes 1.5.0 (or later) cluster. You have kubectl installed and configured to work……