Sunday, May 21, 2017

If you need to allow insecure connections (non-SSL) to your K8S API Server, following is how you can get this done.

First Open your API Server manifest.

sudo vim /etc/kubernetes/manifests/kube-apiserver.yaml

Now add the following properties.

    - --insecure-bind-address=
    - --insecure-port=8080

The complete kube-apiserver.yaml will look like following, (This is a fraction of the yaml file)

apiVersion: v1
kind: Pod
  name: kube-apiserver
  namespace: kube-system
  hostNetwork: true
  - name: kube-apiserver
    - /hyperkube
    - apiserver
    - --bind-address=
    - --etcd-servers=
    - --allow-privileged=true
    - --service-cluster-ip-range=
    - --secure-port=443
    - --insecure-bind-address=
    - --insecure-port=8080
    - --advertise-address=
    - --admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota
    - --tls-cert-file=/etc/kubernetes/ssl/apiserver.pem
    - --tls-private-key-file=/etc/kubernetes/ssl/apiserver-key.pem
    - --client-ca-file=/etc/kubernetes/ssl/ca.pem
    - --service-account-key-file=/etc/kubernetes/ssl/apiserver-key.pem
    - --runtime-config=extensions/v1beta1/networkpolicies=true
    - --anonymous-auth=false

Now restart your kubelet service.

Then in the client machine export the Kubernetes Master URL


And thats it now you can call your kubernetes master through a non secured channel.

Please drop a comment if you have queries.

Friday, May 19, 2017

I was trying to wget one of Jenkins Artifacts, but was continuously getting a 404 error.

HTTP request sent, awaiting response... 404 Not Found
2017-05-19 13:12:13 ERROR 404: Not Found.

My request was as follows.


So my issue was, My URL had some special charactors. (tools$ballerina-tools) A $ character. So Bash droped this when fetching the artefact, So Jenkins was unable to find the actual resource. To solve this type of issue you can use a scape charater to skip the special character.


Full Request is as Follows.


This is one of million ways to get an 404 error, Just mentioning to help someone to save couple of hours. :)
Subscribe to RSS Feed Follow me on Twitter!