I'm working on kubernetes. Now I tried Digital Ocean's kubernetes which is very easy to install and access, but how can I install metric-server in it? how can I auto scale in kubernetes by DO?
Please reply as soon as possible.
The Metrics Server can be installed to your cluster with Helm:
https://github.com/helm/charts/tree/master/stable/metrics-server
helm init
helm upgrade --install metrics-server --namespace=kube-system stable/metrics-server
with RBAC enabled, see the more comprehensive instructions for installing Helm into your cluster:
https://github.com/helm/helm/blob/master/docs/rbac.md
If you wish to deploy without Helm, the manifests are available from the GitHub repository:
https://github.com/kubernetes-incubator/metrics-server/tree/master/deploy/1.8%2B
Related
I'm using Knative to deploy serverless applications in K8s, recently I experienced that cluster-local-gateway is missing from istio-system namespace, Is there any reason for this..? I'm afraid that in the latest versions istio removed it or, It has to be done by Knative side.
FYI - I do my deployments in GCP enabling istio. I do not manually installed the istio
Cluster local gateway need to be installed as part of knative installation. Since you are using GKE to install istio instead of using helm you need to install it manually.
kubectl apply -f https://raw.githubusercontent.com/knative/serving/master/third_party/${VERSION}/istio-knative-extras.yaml
here VERSION is istio version i.e istio-1.5.0
https://github.com/knative/serving/blob/master/third_party/istio-1.5.0/istio-knative-extras.yaml
I have a Kubernetes cluster with 1 master node and 2 worker node. And I have another machine where I installed Helm. Actually I am trying to create Kubernetes resources using Helm chart and trying to deploy into remote Kubernetes cluster.
When I am reading about helm install command, I found that we need to use helm and kubectl command for deploying.
My confusion in here is that, when we using helm install, the created chart will deploy on Kubernetes and we can push it into chart repo also. So for deploying we are using Helm. But why we are using kubectl command with Helm?
Helm 3: No Tiller. Helm install just deploys stuff using kubectl underneath. So to use helm, you also need a configured kubectl.
Helm 2:
Helm/Tiller are client/server, helm needs to connect to tiller to initiate the deployment. Because tiller is not publicly exposed, helm uses kubectl underneath to open a tunnel to tiller. See here: https://github.com/helm/helm/issues/3745#issuecomment-376405184
So to use helm, you also need a configured kubectl. More detailed: https://helm.sh/docs/using_helm/
Chart Repo: is a different concept (same for helm2 / helm3), it's not mandatory to use. They are like artifact storage, for example in quay.io application registry you can audit who pushed and who used a chart. More detailed: https://github.com/helm/helm/blob/master/docs/chart_repository.md. You always can bypass repo and install from src like: helm install /path/to/chart/src
I am trying to install istio. I can easily package the helm chart if I clone the repo from github but I am just wondering if there is a helm chart repo that I can use?
If you're looking for a way to install istio version higher than 1.8.0 then there is a good news.
According to documentation helm support is back, currently in alpha.
We’ve added support for installing Istio with Helm 3. This includes both in-place upgrades and canary deployment of new control planes, after installing 1.8 or later. Helm 3 support is currently Alpha, so please try it out and give your feedback.
There is istio documentation about installing Istio with Helm 3, Helm 2 is not supported for installing Istio.
There are the Prerequisites:
Download the Istio release
Perform any necessary platform-specific setup
Check the Requirements for Pods and Services
Install a Helm client with a version higher than 3.1.1
There are the installation steps for istio 1.8.1:
Note that the default chart configuration uses the secure third party tokens for the service account token projections used by Istio proxies to authenticate with the Istio control plane. Before proceeding to install any of the charts below, you should verify if third party tokens are enabled in your cluster by following the steps describe here. If third party tokens are not enabled, you should add the option --set global.jwtPolicy=first-party-jwt to the Helm install commands. If the jwtPolicy is not set correctly, pods associated with istiod, gateways or workloads with injected Envoy proxies will not get deployed due to the missing istio-token volume.
1.Download the Istio release and change directory to the root of the release package and then follow the instructions below.
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.8.1 sh -
cd istio-1.8.1
2.Create a namespace istio-system for Istio components:
kubectl create namespace istio-system
3.Install the Istio base chart which contains cluster-wide resources used by the Istio control plane:
helm install -n istio-system istio-base manifests/charts/base
4.Install the Istio discovery chart which deploys the istiod service:
helm install --namespace istio-system istiod manifests/charts/istio-control/istio-discovery \
--set global.hub="docker.io/istio" --set global.tag="1.8.1"
5.Install the Istio ingress gateway chart which contains the ingress gateway components:
helm install --namespace istio-system istio-ingress manifests/charts/gateways/istio-ingress \
--set global.hub="docker.io/istio" --set global.tag="1.8.1"
6.(Optional) Install the Istio egress gateway chart which contains the egress gateway components:
helm install --namespace istio-system istio-egress manifests/charts/gateways/istio-egress \
--set global.hub="docker.io/istio" --set global.tag="1.8.1"
7.Verify that all Kubernetes pods in istio-system namespace are deployed and have a STATUS of Running:
kubectl get pods -n istio-system
Yes there is. A quick google search turned this up: https://github.com/istio/istio/tree/master/install/kubernetes/helm/istio
It's a pain to find, and they don't really reference it properly in the documentation, but according to these two comments, the charts can be found in the following locations:
master: https://gcsweb.istio.io/gcs/istio-prerelease/daily-build/master-latest-daily/charts/
v1.1.x: https://gcsweb.istio.io/gcs/istio-prerelease/daily-build/release-1.1-latest-daily/charts/
For a more recent answer, you can now add helm repository for istio for a specific version with helm repo add istio.io https://storage.googleapis.com/istio-release/releases/{{< istio_full_version >}}/charts/ according to documentation here.
It seems that helm repo add istio.io https://storage.googleapis.com/istio-release/releases/charts work too but for older versions (up to 1.1.2). It is not yet documented but follow a more idiomatic versionning. An issue is open on istio : https://github.com/istio/istio/issues/15498
The official helm chart is coming now!
https://artifacthub.io/packages/helm/istio-official/gateway
Need to be careful the comment in issue #31275
Note: this is a 1.12 prerelease, so you need to pass --devel to all helm commands and should not run it in prod yet.
Because the chart is still in the alpha version, we need to pass --devel flag or specify a chart version to allow development versions.
Install steps:
helm repo add istio https://istio-release.storage.googleapis.com/charts
helm repo update
helm install --devel istio-ingressgateway istio/gateway
# or --version 1.12.0-alpha.1
helm repo add istio https://istio.io/charts works. I found it in this PR.
I'm trying to install spinnaker on local kubernetes cluster.
I found some guide at https://github.com/kenzanlabs/spinikube but this guide is out of date. Now all install and config spinnaker via halyard.
I also found this guide https://www.spinnaker.io/setup/quickstart/halyard-gke/ to deploy spinnaker on google kubernetes cloud using google storage.
But I have local kubernetes cluster on my data center, and I configured storageclass (via heketi and glusterfs) to persistent storage. Now I want to install spinnaker on my local cluster.
So can halyard support install spinnaker on local kubernetes cluster?
I would look at using Helm for this. Helm is a package manager for Kubernetes that makes installing applications in your cluster very easy.
Helm uses a packaging format called charts. A chart is basically a collection of files that describe a related set of Kubernetes resources.
There is a Spinnaker Helm Chart available here that will install all Spinnaker services into your cluster with one command.
helm install --name my-spinnaker stable/spinnaker
I want to spin up a single installer pod with helm install that once running, will apply some logic and install other applications into my cluster using helm install.
I'm aware of the helm dependencies, but I want to run some business logic with the installations and I'd rather do it in the installer pod and on the host triggering the whole installation process.
I found suggestions on using the Kubernetes REST API when inside a pod, but helm requires kubectl installed and configured.
Any ideas?
It seems this was a lot easier than I thought...
On a simple pod running Debian, I just installed kubectl, and with the default service account's secret that's already mounted, the kubectl was already configured to the cluster's API.
Note that the configured default namespace is the one that my installer pod is deployed to.
Verified with
$ kubectl cluster-info
$ kubectl get ns
I then installed helm, which was already using the kubectl to access the cluster for installing tiller.
Verified with
$ helm version
$ helm init
I installed a test chart
$ helm install --name my-release stable/wordpress
It works!!
I hope this helps
You could add kubectl to your installer pod.
"In cluster" credentials could be provided via service account in "default-token" secret: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/