# Struggling when trying to setup konnectivity

**URL:** <https://discuss.kubernetes.io/t/struggling-when-trying-to-setup-konnectivity/18645>\
**Category:** General Discussions\
**Tags:** docs\
**Created:** [January 7, 2022, 3:20pm UTC](https://discuss.kubernetes.io/t/struggling-when-trying-to-setup-konnectivity/18645 "2022-01-07T15:20:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaphod](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/zaphod/32/7694_2.png) [@zaphod](https://discuss.kubernetes.io/u/zaphod)\
**Post date:** [January 7, 2022, 3:20pm UTC](https://discuss.kubernetes.io/t/struggling-when-trying-to-setup-konnectivity/18645/1 "2022-01-07T15:20:10Z")

</div>

Asking for help? Comment out what you need so we can get more information to help you!

### Cluster information:

Kubernetes version:1.23.0  
Cloud being used: (put bare-metal if not on a public cloud) bare-metal  
Installation method: dnf install  
Host OS: fedora35

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

Hi there, I’m trying to setup konnectivity and for that I follow the guidelines in

> **[Set up Konnectivity service](https://kubernetes.io/docs/tasks/extend-kubernetes/setup-konnectivity/)**
>
> The Konnectivity service provides a TCP level proxy for the control plane to cluster communication.
> Before you begin You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is...

I am struggling to put all this together; at this point I have a yaml file that I pass to  
`kubeadm init -config kubeadm-init.yaml`  
and that looks like this

```auto
# suggested-by
# https://kubernetes.io/docs/tasks/extend-kubernetes/setup-konnectivity/

#apiVersion: kubeadm.k8s.io/v1beta3
#kind: InitConfiguration
#pod-network-cidr: 10.244.0.0/16
#---
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
apiServer:
  extraArgs:
    egress-selector-config-file: /etc/kubernetes/egress-selector-konnectivity.yaml
  spec:
    containers:
      volumeMounts:
      - name: konnectivity-uds
        mountPath: /etc/kubernetes/konnectivity-server
        readOnly: false
    volumes:
    - name: konnectivity-uds
      hostPath:
        path: /etc/kubernetes/konnectivity-server
        type: DirectoryOrCreate

```

however, this is wrong quite clearly as I am getting this message as an outcome of kubeadm init

```auto
W0107 16:05:11.158926 78269 strict.go:55] error unmarshaling configuration schema.GroupVersionKind{Group:"kubeadm.k8s.io", Version:"v1beta3", Kind:"ClusterConfiguration"}: error unmarshaling JSON: while decoding JSON: json: unknown field "spec"

```

but very generally, I struggle when it comes to writing a yaml config file, even like here from a template, as I don’t understand the logic of where it should be grafted  
it’s the same by the way for the `pod-network-cidr` setting, that I used to pass directly to `kubeadm` on the command-line; but now that I have a config file it appears I need to specify it somehow, but I had to comment that off for now

to summarize, I too often find myself trying to guess how to mix and match these config files, and thought that maybe somebody could either explain the logic at work here, or provide a link to some document that could shed some light on this

any clue would be most welcome; thanks !
