kubectl

Kubernetes no matches for kind “Deployment” in version “extensions/v1beta1”

巧了我就是萌 提交于 2019-12-12 10:39:52
问题 I am trying to deploy the next frontend-deployment.yaml in Kubernetes using Jenkins, but I am having the next error: [frontend] Running shell script + kubectl apply -f IKonnekt/frontend-deployment.yaml error: unable to recognize "IKonnekt/frontend-deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1" If I run kubectl apply -f IKonnekt/frontend-deployment.yaml from a machine inside the Kubernetes cluster it works fine. Kubernetes Client Version: 1.12.1 Kubernetes

How to access canonical kubernetes dashboard externally?

醉酒当歌 提交于 2019-12-12 09:23:13
问题 How to access the canonical kubernetes dashboard from external network/IP? Is there a way to expose dashboard services externally rather accessing from the localhost browser where the canonical k8s cluster node? 回答1: The documentation has a guide on how to do it. Using kubectl proxy kubectl proxy creates proxy server between your machine and Kubernetes API server. By default it is only accessible locally (from the machine that started it). Start local proxy server: $ kubectl proxy Starting to

Disconnect with Azure ACS form Local Machine

╄→尐↘猪︶ㄣ 提交于 2019-12-12 05:26:42
问题 I had pull my azure acs credentials using below command and I can communicate with kubernetes machine on Azure from my local machine az acs kubernetes get-credentials --resource-group=<cluster-resource-group> --name=<cluster-name> But Now I wanted to disconnect this connection so that my kubctl can connect with other machine , it can be local or any other machine (I am trying to connect with local). But everytime I ran kubectl command it communicate with Azure ACS 回答1: For your scenario, we

Why does kubectl have different behavior with sudo?

对着背影说爱祢 提交于 2019-12-12 04:20:45
问题 Running kubectl get pods with sudo: sudo kubectl get pods The connection to the server localhost:8080 was refused - did you specify the right host or port? Running as a normal user: kubectl get pods No resources found. 回答1: By default, kubectl looks in ~/.kube/config (or the file pointed to be $KUBECONFIG) to determine what server to connect to. Your home directory and environment are different when running commands as root. When no connection info is found, kubectl defaults to localhost:8080

how to execute an argument in kubernetes?

爷,独闯天下 提交于 2019-12-11 17:18:25
问题 I have misunderstanding with how to execute $() commands in exec. i'm creating a job in kubernetes with this params: command: - ./kubectl - -n - $MONGODB_NAMESPACE - exec - -ti - $(kubectl - -n - $MONGODB_NAMESPACE - get - pods - --selector=app=$MONGODB_CONTAINER_NAME - -o - jsonpath='{.items[*].metadata.name}') - -- - /opt/mongodb-maintenance.sh but the part with $(kubectl -n ... --selector ...) is treated as a string and don't execute. Please tell me how to do it properly. Thanks! 回答1: As

Can join the cluster, but unable to fetch kubeadm-config

江枫思渺然 提交于 2019-12-11 16:48:42
问题 I am following with the answer here step 6th. To make my own local minikube cluster of single master and 2 nodes . master names minikube . $ kubeadm version kubeadm version: &version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:05:53Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"} $ kubelet --version Kubernetes v1.13.3 login to the minikube console by minikube ssh Then

Accessing spring boot controller endpoint in kubernetes pod

ぐ巨炮叔叔 提交于 2019-12-11 10:49:03
问题 I deployed a spring boot app in kubernetes pod. But normally I access any app in this way of proxy port forwarding - http://192.64.125.29:8001/api/v1/namespaces/kube-system/services/https:hello-app:/proxy/ But my spring boot app is running in this below url - http://192.64.125.29:8001/api/v1/namespaces/kube-system/services/https:myspringbootapp:/proxy/ But I have no idea how to invoke my controller end point /visitid 回答1: If you are just trying to do a quick check then you can port-forward to

How to turn off IP Masquerade in flannel

China☆狼群 提交于 2019-12-11 08:26:11
问题 In my Kubernetes cluster I couldn't connect to the internet from my Containers. So after searching, I found a possible solution, that is to turn off "IP Masquerade". But I had no luck turning this off. Whatever I did I cannot get it disabled. First I change the following, /etc/kubernetes/cni/docker_opts_cni.env DOCKER_OPT_BIP="" DOCKER_OPT_IPMASQ="false" Then tried /etc/kubernetes/cni/docker_opts_cni.env DOCKER_OPT_BIP="" DOCKER_OPT_IPMASQ="--ip-masq=false" I'm using the latest Kubernetes

how to pass environment variable in kubectl deployment?

你说的曾经没有我的故事 提交于 2019-12-11 07:26:37
问题 I am setting up the kubernetes setup for django webapp. I am passing environment variable while creating deployment as below kubectl create -f deployment.yml -l key1=value1 I am getting error as below error: no objects passed to create Able to create the deployment successfully, If i remove the env variable -l key1=value1 while creating deployment. deployment.yaml as below #Deployment apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: service: sigma-service name: $key1 What

Kubernetes deployment does not perform a rolling update when using a single replica

旧时模样 提交于 2019-12-11 06:13:12
问题 I modified the deployment config (production.yaml), changing the container image value. I then ran this: kubectl replace -f production.yaml . While this occurred, my service did not appear to be responding, in addition: kubectl get pods : wordpress-2105335096-dkrvg 3/3 Running 0 47s a while later... : wordpress-2992233824-l4287 3/3 Running 0 14s a while later... : wordpress-2992233824-l4287 0/3 ContainerCreating 0 7s It seems it has terminated the previous pod before the new pod is Running ..