kubectl

kubectl: describe vs get -o <format>

血红的双手。 提交于 2021-01-26 03:19:10
问题 In kubectl, both describe and get -o <format> can be used to get the details of a resource, I'm wondering what's the difference between the two? why does describe even exist if get can do the same thing and more? 回答1: kubectl get shows tables by default. (You can view/visualize large no of objects easily) kubectl describe shows the detailed description. (Better for a single object) kubectl describe is more flattened, has lesser data and easier to read than the full object data given by

kubectl: describe vs get -o <format>

淺唱寂寞╮ 提交于 2021-01-26 03:18:22
问题 In kubectl, both describe and get -o <format> can be used to get the details of a resource, I'm wondering what's the difference between the two? why does describe even exist if get can do the same thing and more? 回答1: kubectl get shows tables by default. (You can view/visualize large no of objects easily) kubectl describe shows the detailed description. (Better for a single object) kubectl describe is more flattened, has lesser data and easier to read than the full object data given by

How can we create service dependencies using kubernetes

半腔热情 提交于 2021-01-20 19:24:18
问题 I have 2 services. One containing 2 pod replicas for a web application which is dependent on another backend service having pod (2 replicas) for MySQL containers. The web application uses environment variables set by backend DB service. I've all the json inside the same directory. Is there any way to express the dependencies so that kubectl always create (and run) backend pods and services before it starts the web application service? I have used kubedeam to create the cluster. 回答1: I can

Why should I specify service before deployment in a single Kubernetes configuration file?

亡梦爱人 提交于 2021-01-02 05:37:49
问题 I'm trying to understand why kubernetes docs recommend to specify service before deployment in one configuration file: The resources will be created in the order they appear in the file. Therefore, it’s best to specify the service first, since that will ensure the scheduler can spread the pods associated with the service as they are created by the controller(s), such as Deployment. Does it mean spread pods between kubernetes cluster nodes? I tested with the following configuration where a

Why should I specify service before deployment in a single Kubernetes configuration file?

女生的网名这么多〃 提交于 2021-01-02 05:37:26
问题 I'm trying to understand why kubernetes docs recommend to specify service before deployment in one configuration file: The resources will be created in the order they appear in the file. Therefore, it’s best to specify the service first, since that will ensure the scheduler can spread the pods associated with the service as they are created by the controller(s), such as Deployment. Does it mean spread pods between kubernetes cluster nodes? I tested with the following configuration where a

Coredns in pending state in Kubernetes cluster

拜拜、爱过 提交于 2020-12-29 07:14:40
问题 I am trying to configure a 2 node Kubernetes cluster. First I am trying to configure the master node of the cluster on a CentOS VM. I have initialized the cluster using 'kubeadm init --apiserver-advertise-address=172.16.100.6 --pod-network-cidr=10.244.0.0/16' and deployed the flannel network to the cluster. But when I do 'kubectl get nodes', I get the following output ---- [root@kubernetus ~]# kubectl get nodes NAME STATUS ROLES AGE VERSION kubernetus NotReady master 57m v1.12.0 Following is

Coredns in pending state in Kubernetes cluster

*爱你&永不变心* 提交于 2020-12-29 07:06:30
问题 I am trying to configure a 2 node Kubernetes cluster. First I am trying to configure the master node of the cluster on a CentOS VM. I have initialized the cluster using 'kubeadm init --apiserver-advertise-address=172.16.100.6 --pod-network-cidr=10.244.0.0/16' and deployed the flannel network to the cluster. But when I do 'kubectl get nodes', I get the following output ---- [root@kubernetus ~]# kubectl get nodes NAME STATUS ROLES AGE VERSION kubernetus NotReady master 57m v1.12.0 Following is

Error: UPGRADE FAILED: failed to replace object: Service “api” is invalid: spec.clusterIP: Invalid value: “”: field is immutable

左心房为你撑大大i 提交于 2020-12-12 11:35:06
问题 When doing helm upgrade ... --force I'm getting this below error Error: UPGRADE FAILED: failed to replace object: Service "api" is invalid: spec.clusterIP: Invalid value: "": field is immutable And This is how my service file looks like: (Not passing clusterIP anywhere ) apiVersion: v1 kind: Service metadata: name: {{ .Chart.Name }} namespace: {{ .Release.Namespace }} annotations: service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https" service.beta.kubernetes.io/aws-load-balancer

Multi-broker Kafka on Kubernetes how to set KAFKA_ADVERTISED_HOST_NAME

。_饼干妹妹 提交于 2020-12-08 08:00:11
问题 My current Kafka deployment file with 3 Kafka brokers looks like this: apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: kafka spec: selector: matchLabels: app: kafka serviceName: kafka-headless replicas: 3 updateStrategy: type: RollingUpdate podManagementPolicy: Parallel template: metadata: labels: app: kafka spec: containers: - name: kafka-instance image: wurstmeister/kafka ports: - containerPort: 9092 env: - name: KAFKA_ADVERTISED_PORT value: "9092" - name: KAFKA_ADVERTISED_HOST

Multi-broker Kafka on Kubernetes how to set KAFKA_ADVERTISED_HOST_NAME

谁都会走 提交于 2020-12-08 07:59:28
问题 My current Kafka deployment file with 3 Kafka brokers looks like this: apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: kafka spec: selector: matchLabels: app: kafka serviceName: kafka-headless replicas: 3 updateStrategy: type: RollingUpdate podManagementPolicy: Parallel template: metadata: labels: app: kafka spec: containers: - name: kafka-instance image: wurstmeister/kafka ports: - containerPort: 9092 env: - name: KAFKA_ADVERTISED_PORT value: "9092" - name: KAFKA_ADVERTISED_HOST