-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helm init fails on Kubernetes 1.16.0 #6374
Comments
We've avoided updating tiller to apps/v1 in the past due to complexity with having |
Here's a short-term workaround:
Actually, it's not good enough. I still get an error:
This can be patched in with:
|
Nice! You might be able to achieve the same effect with the |
Yes, but his crazy sed hacks I can copy & paste, whereas this |
current workaround seems to be something like this: helm init --output yaml > tiller.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: helm
name: tiller
name: tiller-deploy
namespace: kube-system
spec:
replicas: 1
strategy: {}
selector:
matchLabels:
app: helm
name: tiller
.... |
The following sed works-for-me:
The issue with @mattymo solution (using kubectl patch --local) is that is seems to not work when its input contains multiple resource (here a Deployment and a Service). |
Kubernetes 1.16.0 was release yesterday: 9/18/2018. When will this issue be fixed and when will |
If you want to use one less sed :) Thanks! |
Today I met the same issue, I changed the label by myself. I change the label to
|
@jbrette you are my hero! I was struggling with the |
how to change ? can you describe more details? |
@gm12367 how to change and can you describe more details? |
For example, you can use |
@gm12367 Yes, I can see the print but just output. So, what command I can change the output? |
@gm12367 I want to change apps/v1 and add selector part |
@puww1010 I just redirected the output in a file, and then used VIM to change it. Below commands as reference.
|
if your go environment is set up and you can't wait until the following PR which fixes this issue [Helm init compatible with Kubernetes 1.16] #6462 is merged, you can always do: Build mkdir p ${GOPATH}/src/k8s.io
cd ${GOPATH}/src/k8s.io
git clone -b kube16 https://github.com/keleustes/helm.git
cd helm
make bootstrap build Test: kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"} /bin/helm init --wait --tiller-image gcr.io/kubernetes-helm/tiller:v2.14.3
Creating /home/xxx/.helm
Creating /home/xxx/.helm/repository
Creating /home/xxx/.helm/repository/cache
Creating /home/xxx/.helm/repository/local
Creating /home/xxx/.helm/plugins
Creating /home/xxx/.helm/starters
Creating /home/xxx/.helm/cache/archive
Creating /home/xxx/.helm/repository/repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Adding local repo with URL: http://127.0.0.1:8879/charts
$HELM_HOME has been configured at /home/xxx/.helm.
Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.
Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation kubectl get deployment.apps/tiller-deploy -n kube-system -o yaml apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: "2019-09-22T01:01:11Z"
generation: 1
labels:
app: helm
name: tiller
name: tiller-deploy
namespace: kube-system
resourceVersion: "553"
selfLink: /apis/apps/v1/namespaces/kube-system/deployments/tiller-deploy
uid: 124001ca-6f31-417e-950b-2452ce70f522
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: helm
name: tiller
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: helm
name: tiller
spec:
automountServiceAccountToken: true
containers:
- env:
- name: TILLER_NAMESPACE
value: kube-system
- name: TILLER_HISTORY_MAX
value: "0"
image: gcr.io/kubernetes-helm/tiller:v2.14.3
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /liveness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: tiller
ports:
- containerPort: 44134
name: tiller
protocol: TCP
- containerPort: 44135
name: http
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readiness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status:
availableReplicas: 1
conditions:
- lastTransitionTime: "2019-09-22T01:01:23Z"
lastUpdateTime: "2019-09-22T01:01:23Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2019-09-22T01:01:11Z"
lastUpdateTime: "2019-09-22T01:01:23Z"
message: ReplicaSet "tiller-deploy-568db6b69f" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 1
replicas: 1
updatedReplicas: 1 |
@jbrette Still having the same issue after following your instruction |
Looks like you typed "helm" instead of "./bin/helm"....so you are using the old version of the binary. |
After successful init you won't be able to install a chart package from repository until replacing extensions/v1beta1 in it as well.
Replace extensions/v1beta1 to policy/v1beta1 PodSecurityPolicy:
NetworkPolicy apiVersion is handled well by _helpers.tpl for those charts where it is used. Replace extensions/v1beta1 to apps/v1 in Deployment, StatefulSet, ReplicaSet, DaemonSet
Create a new package:
Install it: Based on https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/ P.S. For some charts with dependencies you might need to use |
Getting the same error when running output
|
Check the yaml files, in most cases that referenced line has { } or [ ] and still has other things defined under it which causes the error. In most cases the issue is within the values.yaml, otherwise check the templates section of the chart. |
Just a side note to @PierreF's and @mihivagyok's solution. Those did not work for me when I use private helm repos.
I guess that happens because helm init is not run, just generates yaml file. I fixed that by running |
Since upgrading k8s beyond 1.16.0 version, helm init does no longer work with helm < 2.16.0 due to helm/helm#6374 This PR closes issue kubernetes-sigs#5331
Since upgrading k8s beyond 1.16.0 version, helm init does no longer work with helm < 2.16.0 due to helm/helm#6374 This PR closes issue #5331
Since upgrading k8s beyond 1.16.0 version, helm init does no longer work with helm < 2.16.0 due to helm/helm#6374 This PR closes issue kubernetes-sigs#5331
in k8s v1.16.6, helm init otput require spec.selector fyi . |
updating helm initialization with kubernetes 1.17: helm/helm#6374 (comment)
It's works, since kubernetes change apiVersion apps/v1 to for Deployment, there is one thing need to be change is we need to add selector matchLabels for spec |
Another workaround can be to use helm 3, which does not use tiller. |
Hi, while trying this am getting this : jenkins@jenkin:~/.kube$ helm init --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f - Command 'kubectl' not found, but can be installed with: snap install kubectl jenkins@jenkin:~/.kube$ |
am getting this error: how can I solve it??? root@jenkin: |
I am getting this error : jenkins@jenkin:~/.helm$ helm init --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f - Command 'kubectl' not found, but can be installed with: snap install kubectl jenkins@jenkin:~/.helm$ |
Workaround, using
|
You can't update resource with |
@ikarlashov easy enough to replace 'create' with 'apply.' The one-liner above presumes one hasn't tried creating the resources yet. |
Output of
helm version
: v2.14.3Output of
kubectl version
: client: v1.15.3, server: v1.16.0-rc.1Cloud Provider/Platform (AKS, GKE, Minikube etc.): IBM Cloud Kubernetes Service
Looks like helm is trying to create
tiller
Deployment with:apiVersion: extensions/v1beta1
According to: https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16
that is no longer supported.
The text was updated successfully, but these errors were encountered: